]> granicus.if.org Git - check/commitdiff
Use EXEEXT in unit test running scripts
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sat, 21 Sep 2013 16:03:11 +0000 (16:03 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sat, 21 Sep 2013 16:03:11 +0000 (16:03 +0000)
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
tests/test_log_output.sh
tests/test_output.sh
tests/test_xml_output.sh

index 62276e93541ffc1d683d9fbb40f55ef491d66ba8..d07260e7354a9380b4cddf1feb8eb25db4012011 100755 (executable)
@@ -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
index a75c0f468691b24616bd13d95b470a1a916d8da3..9316f952ad32005c3151fd2b72e619251c815ceb 100755 (executable)
@@ -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:";
index ba460e5b3a9a91dd92a1f624ee15dcd7ad3a0397..f7abc38b72d6593f2e11d35a791442fd7c5c7d15 100755 (executable)
@@ -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:";
index 5912693c8019631c3848281240127dc5fe9258e5..e165d8a30fbe4768ab73e39ac0afb0cf6a74f03c 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+. ./test_vars
+
 if [ "${srcdir}" = "." ]; then
     lsrc=""
 else
@@ -76,10 +78,10 @@ expected="<?xml version=\"1.0\"?>
   </suite>
 </testsuites>"
 
-./ex_xml_output > /dev/null
+./ex_xml_output${EXEEXT} > /dev/null
 actual=`cat test.log.xml | grep -v \<duration\> | grep -v \<datetime\> | grep -v \<path\>`
 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:";