From 69972abb53dbb4a2c9513bca26d75fbeb5b7716b Mon Sep 17 00:00:00 2001 From: brarcher Date: Sat, 21 Sep 2013 16:03:11 +0000 Subject: [PATCH] Use EXEEXT in unit test running scripts Instead of assuming that the extension of the unit testing programs is nothing, use EXEEXT to get the actual extension. git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@755 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- tests/test_check_nofork.sh | 6 ++++-- tests/test_log_output.sh | 6 ++++-- tests/test_output.sh | 12 ++++++------ tests/test_xml_output.sh | 6 ++++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/tests/test_check_nofork.sh b/tests/test_check_nofork.sh index 62276e9..d07260e 100755 --- a/tests/test_check_nofork.sh +++ b/tests/test_check_nofork.sh @@ -1,13 +1,15 @@ #!/bin/sh +. ./test_vars + expected="Running suite(s): NoFork 0%: Checks: 1, Failures: 1, Errors: 0" -actual=`./check_nofork 2>&1` +actual=`./check_nofork${EXEEXT} 2>&1` if [ x"${expected}" = x"${actual}" ]; then exit 0 else - echo "Problem with check_nofork" + echo "Problem with check_nofork${EXEEXT}" echo "Expected: Failure" echo "Got: Segmentation fault" exit 1 diff --git a/tests/test_log_output.sh b/tests/test_log_output.sh index a75c0f4..9316f95 100755 --- a/tests/test_log_output.sh +++ b/tests/test_log_output.sh @@ -1,5 +1,7 @@ #!/bin/sh +. ./test_vars + if [ "${srcdir}" = "." ]; then lsrc="" else @@ -18,10 +20,10 @@ Results for all suites run: test_log_output ( ) { - ./ex_log_output "${1}" > /dev/null + ./ex_log_output${EXEEXT} "${1}" > /dev/null actual=`cat test.log` if [ x"${expected}" != x"${actual}" ]; then - echo "Problem with ex_log_output ${3}"; + echo "Problem with ex_log_output${EXEEXT} ${3}"; echo "Expected:"; echo "${expected}"; echo "Got:"; diff --git a/tests/test_output.sh b/tests/test_output.sh index ba460e5..f7abc38 100755 --- a/tests/test_output.sh +++ b/tests/test_output.sh @@ -31,18 +31,18 @@ error: Core:test_exit [ ${lsrc}ex_output.c:21: (after this point) Early exit with return value 1 ]" -op0=`./ex_output CK_SILENT` -op1=`./ex_output CK_MINIMAL` -op2=`./ex_output CK_NORMAL` -op3=`./ex_output CK_VERBOSE` +op0=`./ex_output${EXEEXT} CK_SILENT` +op1=`./ex_output${EXEEXT} CK_MINIMAL` +op2=`./ex_output${EXEEXT} CK_NORMAL` +op3=`./ex_output${EXEEXT} CK_VERBOSE` if test 1 -eq $ENABLE_SUBUNIT; then -op4=`./ex_output CK_SUBUNIT` +op4=`./ex_output${EXEEXT} CK_SUBUNIT` fi test_output ( ) { if [ "${1}" != "${2}" ]; then - echo "Problem with ex_output ${3}"; + echo "Problem with ex_output${EXEEXT} ${3}"; echo "Expected:"; echo "${1}"; echo "Got:"; diff --git a/tests/test_xml_output.sh b/tests/test_xml_output.sh index 5912693..e165d8a 100755 --- a/tests/test_xml_output.sh +++ b/tests/test_xml_output.sh @@ -1,5 +1,7 @@ #!/bin/sh +. ./test_vars + if [ "${srcdir}" = "." ]; then lsrc="" else @@ -76,10 +78,10 @@ expected=" " -./ex_xml_output > /dev/null +./ex_xml_output${EXEEXT} > /dev/null actual=`cat test.log.xml | grep -v \ | grep -v \ | grep -v \` if [ x"${expected}" != x"${actual}" ]; then - echo "Problem with ex_xml_output ${3}"; + echo "Problem with ex_xml_output${EXEEXT} ${3}"; echo "Expected:"; echo "${expected}"; echo "Got:"; -- 2.50.1