am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / tap-signal.tap
old mode 100755 (executable)
new mode 100644 (file)
index f400695..f1a8130
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -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 \