]> granicus.if.org Git - check/commitdiff
Do not expect the duration for no-fork mode tests to be negative
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Mon, 23 Sep 2013 15:17:52 +0000 (15:17 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Mon, 23 Sep 2013 15:17:52 +0000 (15:17 +0000)
For tests using fork, if the test fails exit() is called, which results
in the duration not being recorded for the test.

no-fork mode instead requires all tests to return, meaning their
duration is always recorded.

The test_xml_output.sh test expected that all failed tests have a negative
duration, which is not the case for no-fork mode. Removing
this expectation, and instead forcing all durations to be >=0 for
no-fork mode.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@785 64e312b2-a51f-0410-8e61-82d0ca0eb02a

NEWS
tests/test_xml_output.sh

diff --git a/NEWS b/NEWS
index 3e0dd230cae2efaf31f42d21eea3ef155ce716b7..86d7b50a534c04e5b03f0f08416f371feb9a7a98 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,12 +2,8 @@ In development:
 
 * Check compiles for the Windows using MinGW-w64.
 
-* The following unit tests now pass for MinGW-w64 builds when run
-  against wine 1.4:
-    - check_check_export
-    - test_output.sh
-    - test_check_nofork.sh
-    - test_log_output.sh
+* All unit tests except check_check now pass on MinGW-w64 builds tested
+  against wine 1.4.
 
 * On systems without timer_settimer, use setitimer (if available) to get
   subsecond unit test timeouts. If setitimer is unavailable, fallback
index 882bdb1ea46fc0804eb154a282c64d3624559488..816b4b5de62259383b9ebcd213acfea763f8ad22 100755 (executable)
@@ -81,6 +81,10 @@ expected_xml="<?xml version=\"1.0\"?>
   </suite>
 </testsuites>"
 expected_duration_count=9
+
+# for fork tests, failures result in exit() being called, which prevents
+# a duration from being sent. This means that every failure results in
+# a -1 for duration, as no duration is known.
 expected_duration_error=5
 else
 expected_xml=`printf "<?xml version=\"1.0\"?>\r
@@ -147,7 +151,10 @@ expected_xml=`printf "<?xml version=\"1.0\"?>\r
 </testsuites>\r
 "`
 expected_duration_count=8
-expected_duration_error=4
+
+# For no-fork mode, all tests 'finish' and do not call exit(). This means
+# that all tests will have a duration >= 0.
+expected_duration_error=0
 fi
 
 ./ex_xml_output${EXEEXT} > /dev/null