]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix Autotest --errexit to exit after XPASSing tests.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 16 Aug 2010 19:14:20 +0000 (21:14 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 16 Aug 2010 19:14:20 +0000 (21:14 +0200)
* 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>
ChangeLog
lib/autotest/general.m4
tests/autotest.at

index 356d78fca4eac3543cefd48f5976d8167c4a8015..fbc69db5ea1c8d6e7e10992bcdf77caf88987fa8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       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.
+
 2010-08-14  Eric Blake  <eblake@redhat.com>
 
        AC_INIT: allow bugreport to contain '?'
index a24834232085c8f951a508eddc2fe16097e50eba..ef76e63cd731a2192fbd889d76d746ce65684fbd 100644 (file)
@@ -1257,6 +1257,9 @@ _ATEOF
       # or the success was unexpected.
       if $at_debug_p || test $at_res = xpass; then
        at_fn_create_debugging_script
+       if test $at_res = xpass && $at_errexit; then
+         echo stop > "$at_stop_file"
+       fi
       else
        if test -d "$at_group_dir"; then
          find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
index b617db6dd2ecf14ddacb03cbaf237e550c3e1c0d..04524a50fe1e51c73155030171d7291220250e31 100644 (file)
@@ -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],