test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / tap-global-result.sh
old mode 100755 (executable)
new mode 100644 (file)
index ba232c3..025d784
@@ -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
@@ -18,9 +18,9 @@
 #  - which global test result derives from different test results
 #    mixed in a single script?
 
-. ./defs || exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > ok.test <<END
 1..3
@@ -140,8 +140,7 @@ END
 
 tests=$(echo *.test) # Also required later.
 
-TESTS="$tests" $MAKE -e check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TESTS="$tests" check
 
 # Dirty trick required here.
 for tst in $(echo " $tests " | sed 's/\.test / /'); do
@@ -149,7 +148,7 @@ for tst in $(echo " $tests " | sed 's/\.test / /'); do
 done
 
 rm -f test-suite.log
-TESTS="$tests" $MAKE -e test-suite.log && exit 1
+run_make -e FAIL TESTS="$tests" test-suite.log
 cat test-suite.log
 
 have_rst_section ()