tests: expose automake bug#14560
[platform/upstream/automake.git] / t / check-fd-redirect.sh
old mode 100755 (executable)
new mode 100644 (file)
index 5a64c22..80f7867
@@ -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
 
 # Simple Tests support: redirection of file descriptors with
 # AM_TESTS_FD_REDIRECT.
-# See also related test 'parallel-tests-fd-redirect.test'.
+# See also related test 'parallel-tests-fd-redirect.sh'.
 
-. ./defs || Exit 1
+# For gen-testsuite-part: ==> try-with-serial-tests <==
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -45,20 +46,17 @@ do_check ()
   cat foo.test # For debugging.
   echo 'this line will be removed' > four
   echo 'this line will not be removed' > five
-  st=0
-  echo 'ok ok ok' | $MAKE check >stdout 2>stderr || st=1
-  cat stdout
-  cat stderr >&2
+  st=0; echo 'ok ok ok' | run_make -O -E -e IGNORE check || st=$?
   cat four
-  test x"$am_parallel_tests" != x"yes" || cat foo.log
+  test x"$am_serial_tests" = x"yes" || cat foo.log
   test $st -eq 0
   grep '[ /]foo\.test: foofoofoo$' stdout
   grep '[ /]foo\.test: barbarbar$' stderr
-  grep 'this line' four && Exit 1
+  grep 'this line' four && exit 1
   grep '^3333$' four
   grep '^this line will not be removed$' five
   grep '^ok ok ok$' five
-  $EGREP '(foofoofoo|barbarbar|3333|ok ok ok|this line)' foo.log && Exit 1
+  $EGREP '(foofoofoo|barbarbar|3333|ok ok ok|this line)' foo.log && exit 1
   :
 }