[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Keep testsuite files on unexpected pass.
From: |
Peter Rosin |
Subject: |
Re: [PATCH] Keep testsuite files on unexpected pass. |
Date: |
Tue, 10 Aug 2010 23:08:03 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 |
Den 2010-08-10 19:07 skrev Eric Blake:
> On 08/10/2010 03:48 AM, Peter Rosin wrote:
>> Hi!
>>
>> I have now gotten sufficiently annoyed about the libtool testsuite
>> not keeping files around for me when a test unexpectedly passes.
>>
>> So, this fixes that.
>
> I like it. Is there any chance you can modify one of the existing
> tests/autotest.at tests to validate in which cases the debug script
> exists after the testsuite runs? Otherwise, I'll try looking into
> enhancing the testsuite before pushing this.
Like this?
Cheers,
Peter
>From 98699000584883b3fa68a6d2535517b23efb5648 Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Tue, 10 Aug 2010 23:05:32 +0200
Subject: [PATCH] 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.
Signed-off-by: Peter Rosin <address@hidden>
---
ChangeLog | 8 ++++++++
lib/autotest/general.m4 | 5 +++--
tests/autotest.at | 17 ++++++++++++-----
3 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b892e09..cfa3c0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-10 Peter Rosin <address@hidden>
+
+ 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 <address@hidden>
Skip AC_FC_SRCEXT([f90]) tests with a Fortran 77 compiler in $FC.
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 170200c..a248342 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -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
diff --git a/tests/autotest.at b/tests/autotest.at
index 7c0a7df..b617db6 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -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. ##
--
1.6.4.2