diff options
Diffstat (limited to 'client/test.sh')
-rwxr-xr-x | client/test.sh | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/client/test.sh b/client/test.sh index 83dc675..cbd0184 100755 --- a/client/test.sh +++ b/client/test.sh @@ -5,6 +5,9 @@ TEST_PRO=test.pro MAKEFILE=Makefile.test TEST_APP=test_app +# Make sure that pracro.cc gets compiled again with the TESTING flags set. +touch pracro.cc + if [ -z $1 ] then TESTFILES=test/test*.cc @@ -25,25 +28,25 @@ do echo Compiling $TEST test: >> $OUTPUT echo ${COMPILE} >> $OUTPUT cpp -P -E -DTESTFILE=\"$TEST\" $TEST_PRO_IN -o $TEST_PRO - qmake -makefile $TEST_PRO -o $MAKEFILE + qmake -makefile $TEST_PRO -o $MAKEFILE if make -f $MAKEFILE 2>&1 >> ${OUTPUT}; then - echo -e "\r\t\t\t\t\t\t[\033[1;32mSuccess\033[0;2m]" - echo "[Success]" >> $OUTPUT - - echo -n "* Running $TEST test" - echo Running $TEST test: >> $OUTPUT - if ./$TEST_APP 2>&1 >> $OUTPUT ; then - echo -e "\r\t\t\t\t\t\t[\033[1;32mSuccess\033[0;2m]" - echo "[Success]" >> $OUTPUT - else - echo -e "\r\t\t\t\t\t\t[\033[1;31mFailure\033[0;2m]" - echo "[Failure]" >> $OUTPUT - fi + echo -e "\r\t\t\t\t\t\t[\033[1;32mSuccess\033[0;2m]" + echo "[Success]" >> $OUTPUT + + echo -n "* Running $TEST test" + echo Running $TEST test: >> $OUTPUT + if ./$TEST_APP 2>&1 >> $OUTPUT ; then + echo -e "\r\t\t\t\t\t\t[\033[1;32mSuccess\033[0;2m]" + echo "[Success]" >> $OUTPUT + else + echo -e "\r\t\t\t\t\t\t[\033[1;31mFailure\033[0;2m]" + echo "[Failure]" >> $OUTPUT + fi else - echo -e "\r\t\t\t\t\t\t[\033[1;31mFailure\033[0;2m]" - echo "[Failure]" >> $OUTPUT + echo -e "\r\t\t\t\t\t\t[\033[1;31mFailure\033[0;2m]" + echo "[Failure]" >> $OUTPUT fi - rm -f $MAKEFILE $TEST_PRO $TEST_APP + rm -f $MAKEFILE $TEST_PRO $TEST_APP done |