tests: avoid use of redirected 'run_make' invocations
[platform/upstream/automake.git] / t / test-missing.sh
old mode 100755 (executable)
new mode 100644 (file)
index 2491da5..a58817f
@@ -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
@@ -16,9 +16,9 @@
 
 # parallel-tests:
 #  - non-existent scripts listed in TESTS get diagnosed
-# See also related test 'test-missing2.test'.
+# See also related test 'test-missing2.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -37,24 +37,20 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
+$MAKE check >output 2>&1 && { cat output; exit 1; }
 cat output
 test -f ok.log
 grep '^PASS: ok\.test' output
 $FGREP 'zardoz.log' output
-test ! -f test-suite.log
+test ! -e test-suite.log
 
-TESTS='zardoz2.test' $MAKE -e check >output 2>&1 \
-  && { cat output; Exit 1; }
-cat output
+run_make -M -e FAIL TESTS='zardoz2.test' check
 $FGREP 'zardoz2.log' output
-test ! -f test-suite.log
+test ! -e test-suite.log
 
-TEST_LOGS='zardoz3.log' $MAKE -e check >output 2>&1 \
-  && { cat output; Exit 1; }
-cat output
+run_make -M -e FAIL TEST_LOGS='zardoz3.log' check
 $FGREP 'zardoz3.log' output
-test ! -f test-suite.log
+test ! -e test-suite.log
 
 # The errors should persist even after 'test-suite.log'
 # has been created.
@@ -63,9 +59,9 @@ test ! -f test-suite.log
 $MAKE check
 rm -f zardoz.test
 
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
+$MAKE check >output 2>&1 && { cat output; exit 1; }
 cat output
 $FGREP 'zardoz.log' output
-test ! -f test-suite.log
+test ! -e test-suite.log
 
 :