tests: avoid a spurious failure on MSYS
[platform/upstream/automake.git] / t / test-driver-custom-multitest.sh
old mode 100755 (executable)
new mode 100644 (file)
index 28e1700..2908a23
@@ -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
@@ -19,9 +19,9 @@
 # only checks implementation details in Automake's custom test drivers
 # support, but also serves as a "usability test" for our APIs.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cp "$am_testauxdir"/trivial-test-driver . \
+cp "$am_testaux_srcdir"/trivial-test-driver . \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
 
 cat >> configure.ac << 'END'
@@ -119,14 +119,13 @@ for vpath in : false; do
 
   $srcdir/configure
 
-  $MAKE check >stdout && { cat stdout; cat test-suite.log; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL check || { cat test-suite.log; exit 1; }
   cat test-suite.log
   # Couple of sanity checks.  These might need to be updated if the
   # 'trivial-test-driver' script is changed.
-  $FGREP INVALID.NAME stdout test-suite.log && Exit 1
-  test -f BAD.LOG && Exit 1
-  test -f BAD.TRS && Exit 1
+  $FGREP INVALID.NAME stdout test-suite.log && exit 1
+  test -f BAD.LOG && exit 1
+  test -f BAD.TRS && exit 1
   # These log files must all have been created by the testsuite.
   cat pass.log
   cat fail.log
@@ -158,10 +157,8 @@ for vpath in : false; do
   grep '%% pass-xpass-fail-xfail-skip-error %%' test-suite.log
   test $(grep -c '%% ' test-suite.log) -eq 4
 
-  TESTS='pass.t pass3-skip2-xfail.t' $MAKE -e check >stdout \
-    || { cat stdout; cat test-suite.log; Exit 1; }
+  run_make -O TESTS='pass.t pass3-skip2-xfail.t' check
   cat test-suite.log
-  cat stdout
   count_test_results total=7 pass=4 fail=0 skip=2 xfail=1 xpass=0 error=0
 
   cd $srcdir