From: Eric Blake Date: Tue, 14 Jul 2009 04:03:27 +0000 (-0600) Subject: Guarantee that exit status trumps output matching. X-Git-Tag: v2.64~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b5b0dda48597bae5f21209ed015cc0cad61ed24;p=thirdparty%2Fautoconf.git Guarantee that exit status trumps output matching. * doc/autoconf.texi (Writing Testsuites) : Document this better. * tests/autotest.at (Skip, parallel skip): Enhance tests. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index f8df09ee..37b7b15c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-07-13 Eric Blake + Guarantee that exit status trumps output matching. + * doc/autoconf.texi (Writing Testsuites) : Document this + better. + * tests/autotest.at (Skip, parallel skip): Enhance tests. + Fix nits in recent patches. * configure.ac (ac_cv_dir_trailing_space): Avoid $status, for zsh. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index aa6ceba4..a4aed6f8 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -22750,7 +22750,8 @@ according to the rules of that literal. Otherwise, the value of the parameter is treated as text that must exactly match the output given by @var{commands} on standard out and standard error (including an empty parameter for no output); any differences are captured in the testsuite -log and the test is failed. The difference between @code{AT_CHECK} and +log and the test is failed (unless an unexpected exit status of 77 +skipped the test instead). The difference between @code{AT_CHECK} and @code{AT_CHECK_UNQUOTED} is that only the latter performs shell variable expansion (@samp{$}), command substitution (@samp{`}), and backslash escaping (@samp{\}) on comparison text given in the @var{stdout} and diff --git a/tests/autotest.at b/tests/autotest.at index 0063c4a0..57382ca8 100644 --- a/tests/autotest.at +++ b/tests/autotest.at @@ -259,7 +259,7 @@ AT_CHECK_AT_TEST([Fallacy], [AT_CHECK([grep failed micro-suite.log], [], [ignore])]) AT_CHECK_AT_TEST([Skip], - [AT_CHECK([exit 77], 0, [], [])], + [AT_CHECK([echo output; echo irrelevant >&2; exit 77], 0, [mismatch], [])], [], [], [], [], [], [AT_CHECK([grep skipped micro-suite.log], [], [ignore])]) @@ -1155,7 +1155,7 @@ AT_CHECK_AT_TEST([parallel fallacy], [AT_CHECK([grep failed micro-suite.log], [], [ignore])], [-j]) AT_CHECK_AT_TEST([parallel skip], - [AT_CHECK([exit 77], 0, [], [])], + [AT_CHECK([echo output; echo irrelevant >&2; exit 77], 0, [mismatch], [])], [], [], [], [], [AT_SKIP_PARALLEL_TESTS], [AT_CHECK([grep skipped micro-suite.log], [], [ignore])], [-j])