From: Ralf Wildenhues Date: Fri, 3 Oct 2008 05:14:24 +0000 (+0200) Subject: Fix more testsuite hang corner cases. X-Git-Tag: v2.63b~287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22e3751d194bdd90bb1949398519a296c9f30cf9;p=thirdparty%2Fautoconf.git Fix more testsuite hang corner cases. * lib/autotest/general.m4: Use the serial code path if no test is to be run. * tests/autotest.at (parallel test execution): Test -j and -jN with `-k notmatched'. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index fd51e809..4ccc626a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-10-03 Ralf Wildenhues + + Fix more testsuite hang corner cases. + * lib/autotest/general.m4: Use the serial code path if no test + is to be run. + * tests/autotest.at (parallel test execution): Test -j and -jN + with `-k notmatched'. + 2008-10-02 Ralf Wildenhues Fix hang with `testsuite -k notmatched'. diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index be135c18..f1966cec 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -1018,6 +1018,9 @@ rm -f "$at_suite_dir/at-source-lines" # Set number of jobs for `-j'; avoid more jobs than test groups. set X $at_groups; shift; at_max_jobs=$[@%:@] +if test $at_max_jobs -eq 0; then + at_jobs=1 +fi if test $at_jobs -ne 1 && { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then at_jobs=$at_max_jobs diff --git a/tests/autotest.at b/tests/autotest.at index a20c4acf..3547ee41 100644 --- a/tests/autotest.at +++ b/tests/autotest.at @@ -846,6 +846,9 @@ AT_CHECK([grep -c '^.\{53\}ok' stdout], [], [1 AT_CHECK([$CONFIG_SHELL ./micro-suite -j3 3], [], [stdout]) AT_CHECK([grep -c '^.\{53\}ok' stdout], [], [1 ]) +# Not even with zero tests: +AT_CHECK([$CONFIG_SHELL ./micro-suite -j -k nomatch], [], [ignore]) +AT_CHECK([$CONFIG_SHELL ./micro-suite -j3 -k nomatch], [], [ignore]) # The parallel scheduler requires mkfifo to work. AT_CHECK([mkfifo fifo || exit 77])