tests: avoid a spurious failure on MSYS
[platform/upstream/automake.git] / t / parallel-tests-concurrency.sh
old mode 100755 (executable)
new mode 100644 (file)
index 702572d..7fbd20e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-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
@@ -17,6 +17,9 @@
 # Check parallel-tests features:
 # - concurrent parallel execution
 
+# FIXME: we should factorize the code to determine how to run
+#        make in parallel out in am-test-lib.sh ...
+
 . test-init.sh
 
 case $MAKE in
@@ -37,7 +40,7 @@ END
     if test x"$j" = xNONE; then
       skip_ "can't run make in parallel mode"
     fi
-    $MAKE ${j}2 all >output 2>&1 || continue
+    run_make -M -- ${j}2 all || continue
     $EGREP -i "(warning|error):|-j[\"\'\` ]" output && continue
     break
   done
@@ -89,9 +92,7 @@ cd serial
 $MAKE ${j}1 check &
 cd ../parallel
 $sleep
-# Use append mode here to avoid dropping output.  See automake bug#11413.
-: > stdout
-$MAKE ${j}4 check >> stdout
+run_make -O -- ${j}4 check
 cd ..
 # Ensure the tests are really being run in parallel mode: if this is
 # the case, the serial run of the dummy testsuite started above should