]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Make parallel testsuite more portable.
authorEric Blake <ebb9@byu.net>
Tue, 7 Jul 2009 12:58:18 +0000 (06:58 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 8 Jul 2009 04:42:50 +0000 (22:42 -0600)
* lib/autotest/general.m4 (AT_INIT) <AT_JOB_FIFO_FD>: Avoid <>;
instead open write descriptor in each group and read descriptor in
main driver.
* tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Relax condition.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/autotest/general.m4
tests/autotest.at

index 68c44906edaff1c19a01de52d19e1b5274953682..ff8e9ce53335eab88b47157d77efe6fdbb16b94b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-07-07  Eric Blake  <ebb9@byu.net>
+
+       Make parallel testsuite more portable.
+       * lib/autotest/general.m4 (AT_INIT) <AT_JOB_FIFO_FD>: Avoid <>;
+       instead open write descriptor in each group and read descriptor in
+       main driver.
+       * tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Relax condition.
+
 2009-07-03  Eric Blake  <ebb9@byu.net>
 
        Avoid syntax error in ash.
index 50c2ff70ae5c69af1a0e7376ad36d92b2d6f183e..a032462b7e84fe964e38403686a4d807fa4c37a2 100644 (file)
@@ -1296,9 +1296,7 @@ at_first=:
 if test $at_jobs -ne 1 &&
      rm -f "$at_job_fifo" &&
      test -n "$at_job_group" &&
-     ( mkfifo "$at_job_fifo" && eval 'exec AT_JOB_FIFO_FD<> "$at_job_fifo"' \
-       && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null &&
-     eval 'exec AT_JOB_FIFO_FD<> "$at_job_fifo"'
+     ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
 then
   # FIFO job dispatcher.
 
@@ -1344,6 +1342,7 @@ dnl avoid all the status output by the shell.
     (
       # Start one test group.
       $at_job_control_off
+      exec AT_JOB_FIFO_FD>"$at_job_fifo"
 dnl When a child receives PIPE, be sure to write back the token,
 dnl so the master does not hang waiting for it.
 dnl errexit and xtrace should not be set in this shell instance,
@@ -1362,7 +1361,7 @@ dnl           kill -13 $$
       at_fn_group_prepare
       if cd "$at_group_dir" &&
         at_fn_test $at_group &&
-        . "$at_test_source" # AT_JOB_FIFO_FD<&-
+        . "$at_test_source" # AT_JOB_FIFO_FD>&-
       then :; else
        AS_WARN([unable to parse test group: $at_group])
        at_failed=:
@@ -1371,13 +1370,16 @@ dnl         kill -13 $$
       echo token >&AT_JOB_FIFO_FD
     ) &
     $at_job_control_off
+    if $at_first; then
+      at_first=false
+      exec AT_JOB_FIFO_FD<"$at_job_fifo"
+    fi
     shift # Consume one token.
     if test $[@%:@] -gt 0; then :; else
       read at_token <&AT_JOB_FIFO_FD || break
       set x $[*]
     fi
     test -f "$at_stop_file" && break
-    at_first=false
   done
   # Read back the remaining ($at_jobs - 1) tokens.
   set X $at_joblist
index e83b329799d384fdc018f44ebe8d1112e8dce9de..b4ba887c7f5491f859c4047edbbac0c94469c3ce 100644 (file)
@@ -992,9 +992,8 @@ m4_define([AT_SKIP_PARALLEL_TESTS],
 # limited conditions; help is appreciated in widening this test base.
 AT_CHECK([${CONFIG_SHELL-$SHELL} -c 'test -n "${BASH_VERSION+set}]]dnl
 [[${ZSH_VERSION+set}${TEST_PARALLEL_AUTOTEST+set}"' || exit 77])
-# The parallel scheduler requires mkfifo and bidirectional redirection to work.
+# The parallel scheduler requires mkfifo to work.
 AT_CHECK([mkfifo fifo || exit 77])
-AT_CHECK([${CONFIG_SHELL-$SHELL} -c 'eval "exec 5<>fifo"' || exit 77])
 ])