From: Ian Jackson Date: Sun, 29 Dec 2019 11:01:28 +0000 (+0000) Subject: tests/example/check: Better handling of makefile updates X-Git-Tag: subdirmk/0.3~88 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=subdirmk.git;a=commitdiff_plain;h=1e8cf1c577b74d3d83a17a9f1ae163eeae3e700d tests/example/check: Better handling of makefile updates Rather than checking just for presence of a string in a templated output file, also have the input file define a target which we try to run. This checks that make actually reread the file. Also add ||false to the grep lines, which makes the stderr output more obviously contain a failure when the test fails. Signed-off-by: Ian Jackson --- diff --git a/tests/example/check b/tests/example/check index a5b27ba..85735af 100755 --- a/tests/example/check +++ b/tests/example/check @@ -26,12 +26,12 @@ make -j4 all check #----- testing rebuild on input change ----- -echo '# for-check 1' >>../src/for-test.sd.mk -make -j4 -grep '^# for-check 1' src/Subdir.mk || false +echo 'for-check-1:' >>../src/for-test.sd.mk +make -j4 for-check-1 +grep '^for-check-1:' src/Subdir.mk || false -echo '# for-check 2' >>../lib/for-test.mk.in -make -j4 -grep '^# for-check 2' lib/for-test.mk || false +echo 'for-check-2:' >>../lib/for-test.mk.in +make -j4 for-check-2 +grep '^for-check-2:' lib/for-test.mk || false echo ok.