]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
autotest: keep testsuite files on unexpected pass
authorPeter Rosin <peda@lysator.liu.se>
Tue, 10 Aug 2010 21:08:03 +0000 (23:08 +0200)
committerEric Blake <eblake@redhat.com>
Sat, 14 Aug 2010 18:01:12 +0000 (12:01 -0600)
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>:
Don't cleanup the group directory when a test unexpectedly passes.
* tests/autotest.at (Cleanup): Check that an unexpected pass leaves
the test group directory intact.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
ChangeLog
lib/autotest/general.m4
tests/autotest.at

index b892e09457f89c20b9924f9c8017170b0fc66f0e..cfa3c0ff13afa835d89c5b42046ff0f7dfde6cd7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-10  Peter Rosin  <peda@lysator.liu.se>
+
+       Keep testsuite files on unexpected pass.
+       * lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>:
+       Don't cleanup the group directory when a test unexpectedly passes.
+       * tests/autotest.at (Cleanup): Check that an unexpected pass leaves
+       the test group directory intact.
+
 2010-08-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Skip AC_FC_SRCEXT([f90]) tests with a Fortran 77 compiler in $FC.
index 170200c9a4e25ea4b274b7302f50a9edfc62235d..a24834232085c8f951a508eddc2fe16097e50eba 100644 (file)
@@ -1253,8 +1253,9 @@ _ATEOF
       AS_ECHO(["$at_log_msg"]) >> "$at_group_log"
       AS_ECHO(["$at_log_msg"]) >&AS_MESSAGE_LOG_FD
 
-      # Cleanup the group directory, unless the user wants the files.
-      if $at_debug_p; then
+      # Cleanup the group directory, unless the user wants the files
+      # or the success was unexpected.
+      if $at_debug_p || test $at_res = xpass; then
        at_fn_create_debugging_script
       else
        if test -d "$at_group_dir"; then
index 7c0a7dfd7555982225f2fffbacb35dcf9802dbaa..b617db6dd2ecf14ddacb03cbaf237e550c3e1c0d 100644 (file)
@@ -478,6 +478,7 @@ AT_CHECK_AT([Binary output],
 
 AT_CHECK_AT_TEST([Cleanup],
   [AT_CHECK([test ! -f cleanup.success && test ! -f cleanup.failure])
+   AT_XFAIL_IF([$xfail])
    AT_CHECK_UNQUOTED([exit $value], [ignore], [$output],
      [], [touch cleanup.failure], [touch cleanup.success])],
   [], [], [], [],
@@ -487,23 +488,29 @@ AT_CHECK_AT_TEST([Cleanup],
    AT_CHECK([test -f micro-suite.dir/1/cleanup.success])
    AT_CHECK([test ! -f micro-suite.dir/1/cleanup.failure])
 
-   AT_CHECK([$CONFIG_SHELL ./micro-suite -d value=1], [], [ignore])
+   AT_CHECK([$CONFIG_SHELL ./micro-suite -d xfail=false value=1], [], [ignore])
    AT_CHECK([test -f micro-suite.dir/1/cleanup.success])
    AT_CHECK([test ! -f micro-suite.dir/1/cleanup.failure])
 
-   AT_CHECK([$CONFIG_SHELL ./micro-suite -d value=1 output=mismatch],
+   AT_CHECK([$CONFIG_SHELL ./micro-suite xfail=: value=0],
+     [1], [ignore], [ignore])
+   AT_CHECK([test -f micro-suite.dir/1/cleanup.success])
+   AT_CHECK([test ! -f micro-suite.dir/1/cleanup.failure])
+
+   AT_CHECK([$CONFIG_SHELL ./micro-suite -d xfail=false value=1 output=mismatch],
      [1], [ignore], [ignore])
    AT_CHECK([test ! -f micro-suite.dir/1/cleanup.success])
    AT_CHECK([test -f micro-suite.dir/1/cleanup.failure])
 
-   AT_CHECK([$CONFIG_SHELL ./micro-suite -d value=77], [], [ignore])
+   AT_CHECK([$CONFIG_SHELL ./micro-suite -d xfail=false value=77], [], [ignore])
    AT_CHECK([test ! -f micro-suite.dir/1/cleanup.success])
    AT_CHECK([test ! -f micro-suite.dir/1/cleanup.failure])
 
-   AT_CHECK([$CONFIG_SHELL ./micro-suite -d value=99], [1], [ignore], [ignore])
+   AT_CHECK([$CONFIG_SHELL ./micro-suite -d xfail=false value=99],
+     [1], [ignore], [ignore])
    AT_CHECK([test ! -f micro-suite.dir/1/cleanup.success])
    AT_CHECK([test ! -f micro-suite.dir/1/cleanup.failure])
-  ], [-d value=0])
+  ], [-d xfail=false value=0])
 
 ## ----------------------------------------------------- ##
 ## Newlines and command substitutions in test commands.  ##