test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / test-driver-acsubst.sh
old mode 100755 (executable)
new mode 100644 (file)
index e8d24ac..a17ac57
@@ -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
@@ -21,7 +21,7 @@
 
 mkdir test-drivers
 
-cp "$am_testauxdir"/trivial-test-driver test-drivers/triv \
+cp "$am_testaux_srcdir"/trivial-test-driver test-drivers/triv \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
 cp "$am_scriptdir"/test-driver test-drivers/dflt \
   || fatal_ "failed to fetch auxiliary script test-driver"
@@ -75,13 +75,12 @@ END
 chmod a+x foo bar.test baz.sh
 
 $MAKE check-autodefs
-st=0; $MAKE check >stdout || st=$?
-cat stdout
+run_make -O -e IGNORE check
 cat test-suite.log
 cat foo.log
 cat bar.log
 cat baz.log
-test $st -eq 0 || exit 1
+test $am_make_rc -eq 0
 count_test_results total=3 pass=1 fail=0 skip=1 xfail=1 xpass=0 error=0
 
 :