]> granicus.if.org Git - check/commitdiff
Always remove test output before running new test
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Tue, 17 Dec 2013 16:07:14 +0000 (16:07 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Tue, 17 Dec 2013 16:07:14 +0000 (16:07 +0000)
Just in case the output is left over from the previous test run

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

tests/test_log_output.sh
tests/test_tap_output.sh
tests/test_xml_output.sh

index eab83af581a44a6ad0574e98511b8b633ea5cf66..b17490bd4b9ca9ea1b37ca40b219bf38669050b7 100755 (executable)
@@ -30,7 +30,7 @@ Results for all suites run:
 fi
 
 test_log_output ( ) {
-    
+    rm -f ${OUTPUT_FILE}
     ./ex_log_output${EXEEXT} "${1}" > /dev/null
     actual=`cat ${OUTPUT_FILE} | tr -d "\r"`
     if [ x"${expected}" != x"${actual}" ]; then
index b5fa2dfcef6b49557ae52641e2684d8986fd91fa..2672b2f64f0db626fadb829e76840e25d0732452 100755 (executable)
@@ -38,6 +38,7 @@ not ok 2 - ${SRCDIR}ex_tap_output.c:Core:test_fail: Failure"
 fi
 
 test_tap_output ( ) {
+    rm -f ${OUTPUT_FILE}
     ./ex_tap_output${EXEEXT} "${1}" > /dev/null
     actual_tap=`cat ${OUTPUT_FILE} | tr -d "\r"`
     expected_tap="${2}"
index c0e4d22e249c2755ad47c32bad3407e3234eea8f..9bec8dee2ea22e7346f900ad5b54b97b9ed40e9e 100755 (executable)
@@ -141,6 +141,7 @@ expected_xml="<?xml version=\"1.0\"?>
 expected_duration_count=8
 fi
 
+rm -f ${OUTPUT_FILE}
 ./ex_xml_output${EXEEXT} > /dev/null
 actual_xml=`cat ${OUTPUT_FILE} | tr -d "\r" | grep -v \<duration\> | grep -v \<datetime\> | grep -v \<path\>`
 if [ x"${expected_xml}" != x"${actual_xml}" ]; then