summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2010-08-16 21:14:20 +0200
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2010-08-16 21:14:20 +0200
commit00d80808b5aa0ca66eccb7653a044b9333c449fa (patch)
treeddad1d38048dacc645db23014b35a8fd4309748c /tests
parent64000cf1f891b8c64b9ad12f7b0f06075ba403b7 (diff)
downloadautoconf-00d80808b5aa0ca66eccb7653a044b9333c449fa.tar.gz
Fix Autotest --errexit to exit after XPASSing tests.
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>: Exit after an unexpected passing test if $at_errexit. * tests/autotest.at (errexit): Also try tests that xpass, skip, xfail, or fail hard. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/autotest.at33
1 files changed, 31 insertions, 2 deletions
diff --git a/tests/autotest.at b/tests/autotest.at
index b617db6d..04524a50 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -368,12 +368,41 @@ AT_CHECK_AT_TEST([errexit],
[AT_CHECK([false])
AT_CLEANUP
AT_SETUP([test that should not be run])
- AT_CHECK([:])],
+ AT_CHECK([:])
+ AT_CLEANUP
+ AT_SETUP([xpassing test])
+ AT_XFAIL_IF([:])
+ AT_CHECK([:])
+ AT_CLEANUP
+ AT_SETUP([another test that should not be run])
+ AT_CHECK([:])
+ AT_CLEANUP
+ AT_SETUP([skipping test])
+ AT_CHECK([exit 77])
+ AT_CLEANUP
+ AT_SETUP([xfailing test])
+ AT_XFAIL_IF([:])
+ AT_CHECK([false])
+ AT_CLEANUP
+ AT_SETUP([a test that should be run])
+ AT_CLEANUP
+ AT_SETUP([hard failure])
+ AT_XFAIL_IF([:])
+ AT_CHECK([exit 99])
+ AT_CLEANUP
+ AT_SETUP([yet another test that should not be run])],
[], [1], [stdout], [stderr], [],
[AT_CHECK([test -f micro-suite.log], [1])
touch micro-suite.log # shut up AT_CAPTURE_FILE.
AT_CHECK([grep "should not be run" stdout], [1])
- AT_CHECK([grep "1 .* inhibited subsequent" stderr], [], [ignore])],
+ AT_CHECK([grep "1 .* inhibited subsequent" stderr], [], [ignore])
+ AT_CHECK([$CONFIG_SHELL ./micro-suite --errexit 3-], [1], [stdout], [stderr])
+ AT_CHECK([grep "should not be run" stdout], [1])
+ AT_CHECK([grep "1 .* inhibited subsequent" stderr], [], [ignore])
+ AT_CHECK([$CONFIG_SHELL ./micro-suite --errexit 5-], [1], [stdout], [stderr])
+ AT_CHECK([grep "should be run" stdout], [0], [ignore])
+ AT_CHECK([grep "should not be run" stdout], [1])
+ AT_CHECK([grep "inhibited subsequent" stderr], [], [ignore])],
[--errexit])
AT_CHECK_AT_TEST([unquoted output],