chiark / gitweb /
c8a99269e2a87c48b1ad6e70f1aa8fc2a2c60c51
[secnet.git] / tests / example / check
1 #!/bin/sh
2 set -ex
3
4 . tests/build-common
5
6 make_copy example
7
8 cd tests/example/example
9
10 : ----- out of tree build -----
11
12 mkdir build
13 cd build
14 >>../src/for-test.sd.mk
15 >>../lib/for-test.mk.in
16 .././autogen.sh && ../configure
17 make -j4 all check
18
19 : ----- testing rebuild on input change -----
20
21 reset_times () {
22         find -type f -print0 \
23         | xargs -0 \
24         touch -hmd 'now -1 seconds' --
25 }
26
27 : ----- for-check-1 -----
28 reset_times
29 echo 'for-check-1:' >>../src/for-test.sd.mk
30 make -j4 for-check-1
31 grep '^for-check-1:' src/Subdir.mk || false
32
33 : ----- for-check-2 -----
34 reset_times
35 echo 'for-check-2:' >>../lib/for-test.mk.in
36 make -j4 for-check-2
37 grep '^for-check-2:' lib/for-test.mk || false
38
39 echo ok.