]> granicus.if.org Git - check/commitdiff
test_xml_output: remove check for -1 in durations
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Fri, 27 Sep 2013 01:38:37 +0000 (01:38 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Fri, 27 Sep 2013 01:38:37 +0000 (01:38 +0000)
This test is only valid on platforms that have a functional
clock_gettime() and do not have a good replacement in libcompat.
If there is no good replacement, then all durations will be 0,
even during failures. Instead of forcing the duration to be
negative during a failure artificially, we remove the requirement.

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

tests/test_xml_output.sh

index 7c7eb714d038b3c9065b21dcdd50121681d33338..c90f5cd8b3ba935d7288287c964dc710d850bea3 100755 (executable)
@@ -75,11 +75,6 @@ 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="<?xml version=\"1.0\"?>
 <?xml-stylesheet type=\"text/xsl\" href=\"http://check.sourceforge.net/xml/check_unittest.xslt\"?>
@@ -144,10 +139,6 @@ expected_xml="<?xml version=\"1.0\"?>
   </suite>
 </testsuites>"
 expected_duration_count=8
-
-# 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
@@ -167,10 +158,4 @@ if [ x"${expected_duration_count}" != x"${actual_duration_count}" ]; then
     exit 1;
 fi
 
-actual_duration_error=`cat test.log.xml | grep \<duration\> | grep -c "\-1\.000000"`
-if [ x"${expected_duration_error}" != x"${actual_duration_error}" ]; then
-    echo "Wrong format for (or number of) error <duration> elements in test.log.xml, ${expected_duration_error} vs ${actual_duration_error}";
-    exit 1;
-fi
-
 exit 0