From: Stefano Lattarini Date: Wed, 28 Sep 2011 08:15:24 +0000 (+0200) Subject: tests: fix spurious failures in tests on TAP + signals X-Git-Tag: ng-0.5a~89^2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27a399a94c622996b6d2d72ef76e442f532c0be7;p=thirdparty%2Fautomake.git tests: fix spurious failures in tests on TAP + signals * tests/tap-signal.tap: Write the dummy test scripts as perl scripts, not as shell scripts, to work around unportabilities in the handling of signals. In fact, even with bash, the older script were unable to properly deliver a SIGQUIT to themselves consistently. --- diff --git a/ChangeLog b/ChangeLog index 2178b72f8..607c5c573 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-09-28 Stefano Lattarini + + tests: fix spurious failures in tests on TAP + signals + * tests/tap-signal.tap: Write the dummy test scripts as perl + scripts, not as shell scripts, to work around unportabilities + in the handling of signals. In fact, even with bash, the older + script were unable to properly deliver a SIGQUIT to themselves + consistently. + 2011-09-26 Stefano Lattarini tests: fix spurious failure in test on ACLOCAL_PATH precedences diff --git a/tests/tap-signal.tap b/tests/tap-signal.tap index e27962eb3..9a1858646 100755 --- a/tests/tap-signal.tap +++ b/tests/tap-signal.tap @@ -22,7 +22,11 @@ am_parallel_tests=yes plan_ 10 -echo TESTS = > Makefile.am +cat > Makefile.am << END +TEST_LOG_COMPILER = $PERL -w +## Will be updated later. +TESTS = +END all_signals='1 2 3 9 13 15' blocked_signals='' @@ -32,12 +36,21 @@ for sig in $all_signals; do blocked_signals="$blocked_signals $sig" continue fi + # Write the dummy test scripts in perl, not as shell scripts, to work + # around unportabilities in the handling of signals (in fact, even + # with bash, the older script were unable to properly deliver a SIGQUIT + # to themselves consistently). The shebang is dummy here, as we prefer + # to rely on the definition of TEST_LOG_COMPILER instead. unindent > signal-$sig.test < "all"; + print "1..1\\n"; + print "ok 1\\n"; + kill $sig, \$\$; + print "Bail out! \$0 not killed?\\n"; END echo TESTS += signal-$sig.test >> Makefile.am done