diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-26 12:04:48 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-26 12:16:05 +0200 |
commit | d81424aa9a976e0854af3a3e4aad00a603cd02b4 (patch) | |
tree | 1be76798905165fc0a8124b2644b627fef62f0db /t | |
parent | ac13ca500648395417e5d9bcf110475b42841bee (diff) | |
parent | 73a09981c3ed6932a319768bfb7a5fffc80457b3 (diff) | |
download | automake-d81424aa9a976e0854af3a3e4aad00a603cd02b4.tar.gz |
Merge branch 'micro' into maint
* micro:
tests: avoid a couple of extra sleep with GNU make
NEWS: document testsuite work for 1.13.3
lint: remove a couple of obsolete syntax checks
lint: cosmetics: use #-comments, not ##-comments
lint: cosmetics: some reordering
lint: recipes of syntax check require GNU grep; ensure it is used
lint: better name for a syntax check
tests: rename $am_make_rc_got -> $am_make_rc
tests: ensure $required is not set too late
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't')
-rw-r--r-- | t/ax/am-test-lib.sh | 24 | ||||
-rw-r--r-- | t/ax/tap-summary-aux.sh | 4 | ||||
-rw-r--r-- | t/ax/test-init.sh | 4 | ||||
-rw-r--r-- | t/ax/testsuite-summary-checks.sh | 4 | ||||
-rw-r--r-- | t/deleted-am.sh | 4 | ||||
-rw-r--r-- | t/parallel-tests-exit-statuses.sh | 8 | ||||
-rw-r--r-- | t/parallel-tests-extra-programs.sh | 4 | ||||
-rw-r--r-- | t/parallel-tests-fd-redirect-exeext.sh | 2 | ||||
-rw-r--r-- | t/parallel-tests-fd-redirect.sh | 2 | ||||
-rw-r--r-- | t/parallel-tests-fork-bomb.sh | 2 | ||||
-rw-r--r-- | t/parallel-tests-no-spurious-summary.sh | 2 | ||||
-rw-r--r-- | t/parallel-tests-recheck-pr11791.sh | 8 | ||||
-rw-r--r-- | t/parallel-tests-reset-term.sh | 2 | ||||
-rw-r--r-- | t/tap-signal.tap | 2 | ||||
-rw-r--r-- | t/test-driver-acsubst.sh | 2 | ||||
-rw-r--r-- | t/test-driver-cond.sh | 2 |
16 files changed, 40 insertions, 36 deletions
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh index 53dd27ee5..8fee84f60 100644 --- a/t/ax/am-test-lib.sh +++ b/t/ax/am-test-lib.sh @@ -188,14 +188,14 @@ run_make () am__make_redirect_stderr=no am__make_redirect_stdall=no am__make_flags= - # Follow-up code might want to analyse these, so don't make them as - # private, nor unset them later. - am_make_rc_exp=0 - am_make_rc_got=0 + am__make_rc_exp=0 + # Follow-up code might want to analyse this, so mark is as + # publicly accessible (no double undesrscore). + am_make_rc=0 # Parse options for this function. while test $# -gt 0; do case $1 in - -e) am_make_rc_exp=$2; shift;; + -e) am__make_rc_exp=$2; shift;; -O) am__make_redirect_stdout=yes;; -E) am__make_redirect_stderr=yes;; -M) am__make_redirect_stdall=yes;; @@ -269,9 +269,9 @@ run_make () fi fi exec $MAKE ${1+"$@"} - ) || am_make_rc_got=$? + ) || am_make_rc=$? - if test $am_make_rc_got -eq 253; then + if test $am_make_rc -eq 253; then fatal_ "run_make: problems in redirecting make output" fi @@ -286,17 +286,17 @@ run_make () fi fi - case $am_make_rc_exp in + case $am__make_rc_exp in IGNORE) : Ignore exit status ;; FAIL) - test $am_make_rc_got -gt 0 || return 1 + test $am_make_rc -gt 0 || return 1 ;; *) - test $am_make_rc_exp -ge 0 && test $am_make_rc_exp -le 255 \ - || fatal_ "invalid expected exit status: '$am_make_rc_exp'" - test $am_make_rc_exp -eq $am_make_rc_got || return 1 + test $am__make_rc_exp -ge 0 && test $am__make_rc_exp -le 255 \ + || fatal_ "invalid expected exit status: '$am__make_rc_exp'" + test $am_make_rc -eq $am__make_rc_exp || return 1 ;; esac } diff --git a/t/ax/tap-summary-aux.sh b/t/ax/tap-summary-aux.sh index 472c43f4b..a914087a9 100644 --- a/t/ax/tap-summary-aux.sh +++ b/t/ax/tap-summary-aux.sh @@ -62,9 +62,9 @@ do_check () fi run_make -O -e IGNORE $make_args check if test $expect_failure = yes; then - test $am_make_rc_got -gt 0 || exit 1 + test $am_make_rc -gt 0 || exit 1 else - test $am_make_rc_got -eq 0 || exit 1 + test $am_make_rc -eq 0 || exit 1 fi $PERL "$am_testaux_srcdir"/extract-testsuite-summary.pl stdout >summary.got \ || fatal_ "cannot extract testsuite summary" diff --git a/t/ax/test-init.sh b/t/ax/test-init.sh index 42db05004..daf0bba45 100644 --- a/t/ax/test-init.sh +++ b/t/ax/test-init.sh @@ -17,6 +17,10 @@ set -e +# The variable '$required' should no longer be modified after this +# file gets sources. +required=${required-}; readonly required + # Source the actual code for test initialization and setup. . test-lib.sh . am-test-lib.sh diff --git a/t/ax/testsuite-summary-checks.sh b/t/ax/testsuite-summary-checks.sh index 1b37134b9..962a73022 100644 --- a/t/ax/testsuite-summary-checks.sh +++ b/t/ax/testsuite-summary-checks.sh @@ -76,9 +76,9 @@ do_check () done run_make -O -e IGNORE check TESTS="$tests" XFAIL_TESTS="$xfail_tests" if $expect_failure; then - test $am_make_rc_got -gt 0 || exit 1 + test $am_make_rc -gt 0 || exit 1 else - test $am_make_rc_got -eq 0 || exit 1 + test $am_make_rc -eq 0 || exit 1 fi $PERL "$am_testaux_srcdir"/extract-testsuite-summary.pl stdout >summary.got \ || fatal_ "cannot extract testsuite summary" diff --git a/t/deleted-am.sh b/t/deleted-am.sh index 980a27a5b..837e10f23 100644 --- a/t/deleted-am.sh +++ b/t/deleted-am.sh @@ -35,7 +35,7 @@ $AUTOMAKE $MAKE rm -f zardoz.am -$sleep # Required to avoid racy failures with FreeBSD make. +using_gmake || $sleep # Required by BSD make. run_make -e FAIL -M # This error will come from automake, not make, so we can be stricter # in our grepping of it. @@ -48,7 +48,7 @@ $AUTOMAKE Makefile ./config.status Makefile $MAKE # Sanity check. rm -f foobar.am -$sleep # Required to avoid racy failures with FreeBSD make. +using_gmake || $sleep # Required by BSD make. run_make -e FAIL -M # This error will come from automake, not make, so we can be stricter # in our grepping of it. diff --git a/t/parallel-tests-exit-statuses.sh b/t/parallel-tests-exit-statuses.sh index 54181e2cf..6bbc61587 100644 --- a/t/parallel-tests-exit-statuses.sh +++ b/t/parallel-tests-exit-statuses.sh @@ -72,7 +72,7 @@ sed '/^ERROR:/d' exp-1 > exp-2 mk_ () { n=$1; shift - unset am_make_rc_got + unset am_make_rc run_make -e IGNORE -O -- ${1+"$@"} check cat test-suite.log LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-$n @@ -82,10 +82,10 @@ mk_ () } mk_ 0 -test $am_make_rc_got -gt 0 +test $am_make_rc -gt 0 mk_ 1 XFAIL_TESTS="$failure_statuses 99" -test $am_make_rc_got -gt 0 +test $am_make_rc -gt 0 mk_ 2 XFAIL_TESTS="$failure_statuses" TESTS="0 77 $failure_statuses" -test $am_make_rc_got -eq 0 +test $am_make_rc -eq 0 : diff --git a/t/parallel-tests-extra-programs.sh b/t/parallel-tests-extra-programs.sh index 4df28adf8..01252195b 100644 --- a/t/parallel-tests-extra-programs.sh +++ b/t/parallel-tests-extra-programs.sh @@ -118,7 +118,7 @@ $AUTOMAKE -a run_make -E -O -e IGNORE -- -k check ls -l if using_gmake; then - test $am_make_rc_got -gt 0 || exit 1 + test $am_make_rc -gt 0 || exit 1 else # Don't trust exit status of "make -k" for non-GNU make. $MAKE check && exit 1 @@ -157,7 +157,7 @@ echo 'int main (void) { return 0; }' > none.c run_make -O -e IGNORE check RECHECK_LOGS= ls -l # For debugging. -test $am_make_rc_got -eq 0 || exit 1 +test $am_make_rc -eq 0 || exit 1 # For debugging. stat stamp foo.log bar.log baz.log || : diff --git a/t/parallel-tests-fd-redirect-exeext.sh b/t/parallel-tests-fd-redirect-exeext.sh index e4d7caa69..1dcdbd906 100644 --- a/t/parallel-tests-fd-redirect-exeext.sh +++ b/t/parallel-tests-fd-redirect-exeext.sh @@ -107,7 +107,7 @@ test $st -eq 0 || fatal_ "doesn't cover expected code paths" run_make -O -e IGNORE check cat baz.log cat qux.log -test $am_make_rc_got -eq 0 +test $am_make_rc -eq 0 grep "^ bazbazbaz$" stdout grep "^ quxquxqux$" stdout $EGREP '(bazbazbaz|quxquxqux)' *.log && exit 1 diff --git a/t/parallel-tests-fd-redirect.sh b/t/parallel-tests-fd-redirect.sh index 1ccaf74bf..cb331ca2f 100644 --- a/t/parallel-tests-fd-redirect.sh +++ b/t/parallel-tests-fd-redirect.sh @@ -60,7 +60,7 @@ test $st -eq 0 || fatal_ "doesn't cover expected code paths" run_make -O -e IGNORE check cat foo.log cat bar.log -test $am_make_rc_got -eq 0 +test $am_make_rc -eq 0 grep "^ foofoofoo$" stdout grep "^ barbarbar$" stdout $EGREP '(foofoofoo|barbarbar)' *.log && exit 1 diff --git a/t/parallel-tests-fork-bomb.sh b/t/parallel-tests-fork-bomb.sh index 1361bbd19..62cd24163 100644 --- a/t/parallel-tests-fork-bomb.sh +++ b/t/parallel-tests-fork-bomb.sh @@ -105,7 +105,7 @@ do_check () test ! -e "$log" if using_gmake; then grep "[Cc]ircular.*dependency" output | $FGREP "$log" - test $am_make_rc_got -gt 0 + test $am_make_rc -gt 0 else # Look for possible error messages about circular dependencies from # either make or our own recipes. At least one such a message must diff --git a/t/parallel-tests-no-spurious-summary.sh b/t/parallel-tests-no-spurious-summary.sh index 300d593d0..7c6398b76 100644 --- a/t/parallel-tests-no-spurious-summary.sh +++ b/t/parallel-tests-no-spurious-summary.sh @@ -53,7 +53,7 @@ run_make -O -e IGNORE check cat test-suite.log cat foo.log cat bar.log -test $am_make_rc_got -eq 0 +test $am_make_rc -eq 0 grep '^:test-result:XFAIL$' foo.log grep '^:test-result: SKIP$' foo.log diff --git a/t/parallel-tests-recheck-pr11791.sh b/t/parallel-tests-recheck-pr11791.sh index cad1969bb..1933aa98d 100644 --- a/t/parallel-tests-recheck-pr11791.sh +++ b/t/parallel-tests-recheck-pr11791.sh @@ -41,10 +41,10 @@ $AUTOMAKE -a run_make -O -e FAIL check count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0 -$sleep # Required to avoid a spurious failure with some FreeBSD makes. +using_gmake || $sleep # Required by BSD make. run_make -O -e IGNORE -- -k recheck # Don't trust the exit status of "make -k" for non-GNU makes. -! using_gmake || test $am_make_rc_got -gt 0 || exit 1 +! using_gmake || test $am_make_rc -gt 0 || exit 1 count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0 # Introduce an error in foo.c, that should cause a compilation failure. @@ -59,10 +59,10 @@ $EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1 test -f foo.log test -f foo.trs -$sleep # Required to avoid a spurious failure with some FreeBSD makes. +using_gmake || $sleep # Required by BSD make. run_make -O -e IGNORE -- -k recheck # Don't trust the exit status of "make -k" for non-GNU makes. -! using_gmake || test $am_make_rc_got -gt 0 || exit 1 +! using_gmake || test $am_make_rc -gt 0 || exit 1 # We don't get a change to run the testsuite. $EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1 test -f foo.log diff --git a/t/parallel-tests-reset-term.sh b/t/parallel-tests-reset-term.sh index 187a503be..3dae4b670 100644 --- a/t/parallel-tests-reset-term.sh +++ b/t/parallel-tests-reset-term.sh @@ -45,7 +45,7 @@ mkcheck () cat stdout cat foobar.log cat test-suite.log - return $am_make_rc_got + return $am_make_rc } $ACLOCAL diff --git a/t/tap-signal.tap b/t/tap-signal.tap index 27e23ab97..f1a81308b 100644 --- a/t/tap-signal.tap +++ b/t/tap-signal.tap @@ -113,7 +113,7 @@ command_ok_ '"make check" fails' eval ' # garbled output with NetBSD make, which would miss some final # newlines in the expected places and thus mess up our TAP output. set +x; echo - test $am_make_rc_got -gt 0 + test $am_make_rc -gt 0 ) ' cat stdout # For debugging. diff --git a/t/test-driver-acsubst.sh b/t/test-driver-acsubst.sh index 85113a469..a17ac5775 100644 --- a/t/test-driver-acsubst.sh +++ b/t/test-driver-acsubst.sh @@ -80,7 +80,7 @@ cat test-suite.log cat foo.log cat bar.log cat baz.log -test $am_make_rc_got -eq 0 +test $am_make_rc -eq 0 count_test_results total=3 pass=1 fail=0 skip=1 xfail=1 xpass=0 error=0 : diff --git a/t/test-driver-cond.sh b/t/test-driver-cond.sh index cf204c4f4..febb9d2f8 100644 --- a/t/test-driver-cond.sh +++ b/t/test-driver-cond.sh @@ -107,7 +107,7 @@ cat test-suite.log cat foo.log cat bar.log cat baz.log -test $am_make_rc_got -eq 0 || exit 1 +test $am_make_rc -eq 0 || exit 1 do_count run_make -O distcheck |