test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / tap-signal.tap
old mode 100755 (executable)
new mode 100644 (file)
index 2d49389..f1a8130
@@ -108,13 +108,12 @@ signal_caught ()
 
 command_ok_ '"make check" fails' eval '
   (
-    st=0; $MAKE check >stdout || st=$?
-    cat stdout
+    run_make -e IGNORE -O check
     # Extra "echo" and silencing of xtraces required to avoid possible
     # garbled output with NetBSD make, which would miss some final
     # newlines in the expected places and thus mess up our TAP output.
     set +x; echo
-    test $st -gt 0
+    test $am_make_rc -gt 0
   )
 '
 cat stdout # For debugging.
@@ -130,8 +129,7 @@ done
 
 echo 'TEST_LOG_DRIVER_FLAGS = --ignore-exit' >> Makefile
 
-command_ok_ '"make check" passes [--ignore-exit]' eval '$MAKE check >stdout'
-cat stdout # For debugging.
+command_ok_ '"make check" passes [--ignore-exit]' run_make -O check
 
 command_ok_ "count of test results [--ignore-exit]" count_test_results \
   total=$results_count pass=$results_count \