tests: better idiom to override make macro defs on the cmdline
[platform/upstream/automake.git] / t / tap-recheck-logs.sh
index 166de6e..a4d52aa 100644 (file)
@@ -58,14 +58,14 @@ grep_summary ()
   grep '^# ERROR: *1$' stdout
 }
 
-$MAKE -e check && exit 1
+run_make -e FAIL check
 test -f foo.log
 test -f bar.log
 test -f baz.log
 
 rm -f foo.log bar.log
 
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
+run_make RECHECK_LOGS= check > stdout && { cat stdout; exit 1; }
 cat stdout
 test -f foo.log
 test -f bar.log
@@ -80,7 +80,7 @@ touch foo.test
 # We re-run only a successful test, but the tests that failed in the
 # previous run should still be taken into account, and cause an overall
 # failure.
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
+run_make RECHECK_LOGS= check > stdout && { cat stdout; exit 1; }
 cat stdout
 grep '^PASS: foo\.test 1$' stdout
 grep '^PASS: foo\.test 2$' stdout
@@ -90,7 +90,7 @@ grep_summary
 
 $sleep
 touch zardoz
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
+run_make RECHECK_LOGS= check > stdout && { cat stdout; exit 1; }
 cat stdout
 grep '^ERROR: baz\.test' stdout
 $EGREP '(foo|bar)\.test' stdout && exit 1
@@ -99,7 +99,7 @@ grep_summary
 
 # Now, explicitly retry with all test logs already updated, and ensure
 # that the summary is still displayed.
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
+run_make RECHECK_LOGS= check > stdout && { cat stdout; exit 1; }
 cat stdout
 $EGREP '(foo|bar|baz)\.test' stdout && exit 1
 grep_summary
@@ -107,7 +107,7 @@ grep_summary
 # The following should re-run foo.test (and only foo.test), even if its
 # log file is up-to-date.
 : > older
-env RECHECK_LOGS=foo.log $MAKE -e check > stdout && { cat stdout; exit 1; }
+run_make RECHECK_LOGS=foo.log check > stdout && { cat stdout; exit 1; }
 cat stdout
 grep '^PASS: foo\.test 1$' stdout
 grep '^PASS: foo\.test 2$' stdout