diff options
author | deva <deva> | 2009-08-31 15:01:56 +0000 |
---|---|---|
committer | deva <deva> | 2009-08-31 15:01:56 +0000 |
commit | eedcfd2f8b9e17f0903b7ff85421636830d2291d (patch) | |
tree | a41322beccee45924f53b420d5ac1933a6fa21c5 /client/test.sh | |
parent | ac9b15c17e81fd8cf828ca8eb9770a7ec5a6de20 (diff) |
Some more tests.
Diffstat (limited to 'client/test.sh')
-rwxr-xr-x | client/test.sh | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/client/test.sh b/client/test.sh index 1c3c96d..83dc675 100755 --- a/client/test.sh +++ b/client/test.sh @@ -3,9 +3,15 @@ TEST_PRO_IN=test.pro.in TEST_PRO=test.pro MAKEFILE=Makefile.test -TESTFILES=test/test*.cc TEST_APP=test_app +if [ -z $1 ] +then + TESTFILES=test/test*.cc +else + TESTFILES=$1 +fi + rm -f test.log for TEST in $TESTFILES @@ -16,27 +22,28 @@ do echo Testing $TEST: > $OUTPUT echo -n "* Compiling $TEST test" - echo Compiling $TEST test: > $OUTPUT + 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 - if make -f $MAKEFILE >> ${OUTPUT} 2>&1; 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 >> $OUTPUT 2>&1; 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 + 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 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 done -rm -f $MAKEFILE $TEST_PRO $TEST_APP |