From: brarcher Date: Tue, 17 Dec 2013 16:07:11 +0000 (+0000) Subject: use variable OUTPUT_FILE for tests that check logging output X-Git-Tag: 0.10.0~332 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd75b899bf29bd50d4e95b2ee4fc9b642f3d33ad;p=check use variable OUTPUT_FILE for tests that check logging output This is better than hard coding the name throghout the test git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@884 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/tests/test_log_output.sh b/tests/test_log_output.sh index e06b4fa..eab83af 100755 --- a/tests/test_log_output.sh +++ b/tests/test_log_output.sh @@ -1,5 +1,7 @@ #!/bin/sh +OUTPUT_FILE=test.log + . ./test_vars if [ x"${SRCDIR}" != x"." ]; then @@ -30,7 +32,7 @@ fi test_log_output ( ) { ./ex_log_output${EXEEXT} "${1}" > /dev/null - actual=`cat test.log | tr -d "\r"` + actual=`cat ${OUTPUT_FILE} | tr -d "\r"` if [ x"${expected}" != x"${actual}" ]; then echo "Problem with ex_log_output${EXEEXT} ${1}"; echo "Expected:"; diff --git a/tests/test_xml_output.sh b/tests/test_xml_output.sh index 6d64098..c0e4d22 100755 --- a/tests/test_xml_output.sh +++ b/tests/test_xml_output.sh @@ -152,9 +152,9 @@ if [ x"${expected_xml}" != x"${actual_xml}" ]; then exit 1; fi -actual_duration_count=`grep -c \ test.log.xml` +actual_duration_count=`grep -c \ ${OUTPUT_FILE}` if [ x"${expected_duration_count}" != x"${actual_duration_count}" ]; then - echo "Wrong number of elements in test.log.xml, ${expected_duration_count} vs ${actual_duration_count}"; + echo "Wrong number of elements in ${OUTPUT_FILE}, ${expected_duration_count} vs ${actual_duration_count}"; exit 1; fi