From 1e8cf1c577b74d3d83a17a9f1ae163eeae3e700d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 29 Dec 2019 11:01:28 +0000 Subject: [PATCH] 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 --- tests/example/check | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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. -- 2.30.2