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
#!/bin/sh
+OUTPUT_FILE=test.log
+
. ./test_vars
if [ x"${SRCDIR}" != x"." ]; then
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:";
exit 1;
fi
-actual_duration_count=`grep -c \<duration\> test.log.xml`
+actual_duration_count=`grep -c \<duration\> ${OUTPUT_FILE}`
if [ x"${expected_duration_count}" != x"${actual_duration_count}" ]; then
- echo "Wrong number of <duration> elements in test.log.xml, ${expected_duration_count} vs ${actual_duration_count}";
+ echo "Wrong number of <duration> elements in ${OUTPUT_FILE}, ${expected_duration_count} vs ${actual_duration_count}";
exit 1;
fi