From 2b5b0dda48597bae5f21209ed015cc0cad61ed24 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 13 Jul 2009 22:03:27 -0600 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ doc/autoconf.texi | 3 ++- tests/autotest.at | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) 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]) -- 2.47.2