+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.
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.
(
# 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,
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=:
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
# 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])
])