From: brarcher Date: Mon, 23 Sep 2013 15:17:52 +0000 (+0000) Subject: Do not expect the duration for no-fork mode tests to be negative X-Git-Tag: 0.10.0~429 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35ed92ad29ba8e83cced86795bea13a0848408e3;p=check Do not expect the duration for no-fork mode tests to be negative 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 --- diff --git a/NEWS b/NEWS index 3e0dd23..86d7b50 100644 --- 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 diff --git a/tests/test_xml_output.sh b/tests/test_xml_output.sh index 882bdb1..816b4b5 100755 --- a/tests/test_xml_output.sh +++ b/tests/test_xml_output.sh @@ -81,6 +81,10 @@ expected_xml=" " 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 "\r @@ -147,7 +151,10 @@ expected_xml=`printf "\r \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