test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / tap-bailout-suppress-badexit.sh
old mode 100755 (executable)
new mode 100644 (file)
index 7cd5458..8f5fb15
@@ -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,7 +18,7 @@
 #  - A "Bail out!" directive causes the driver to ignore the exit
 #    status of the test script.
 
-. ./defs || exit 1
+. test-init.sh
 
 tests='exit.test exit127.test sighup.test sigterm.test'
 
@@ -54,10 +54,9 @@ END
 
 chmod a+x $tests
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=4 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=4
+
 for tst in $tests; do grep "^ERROR: $tst - Bail out!" stdout; done
 $EGREP "ERROR: .*(exit.*status|terminat.*signal)" stdout && exit 1