| 1 |
############################################################################## |
| 2 |
## run_unitTest |
| •3 |
## Revision: $Id$ |
| 4 |
## |
| 5 |
## Copyright (C) Andrea Walther |
| 6 |
## |
| 7 |
## This file is part of ADOL-C. This software is provided as open source. |
| 8 |
## Any use, reproduction, or distribution of the software constitutes |
| 9 |
## recipient's acceptance of the terms of the accompanying license file. |
| 10 |
## |
| 11 |
############################################################################## |
| 12 |
|
| 13 |
srcdir="." |
| 14 |
|
| 15 |
retval=0 |
| 16 |
|
| 17 |
echo " " |
| 18 |
echo Running tests... |
| 19 |
echo " " |
| 20 |
|
| 21 |
echo Testing powexam... |
| 22 |
./powexam >tmpfile 2>&1 |
| 23 |
grep "TEST PASSED" tmpfile 1>/dev/null 2>&1 |
| 24 |
if test $? = 0; then |
| 25 |
echo " " |
| 26 |
echo " Test passed!" |
| 27 |
echo " " |
| 28 |
else |
| 29 |
retval=-1 |
| 30 |
echo " " |
| 31 |
echo " ---- 8< ---- Start of test program output ---- 8< ----" |
| 32 |
cat tmpfile |
| 33 |
echo " ---- 8< ---- End of test program output ---- 8< ----" |
| 34 |
echo " " |
| 35 |
echo " ******** Test FAILED! ********" |
| 36 |
echo "Output of the test program is above." |
| 37 |
fi |
| 38 |
rm -rf tmpfile |
| 39 |
|
| 40 |
echo Testing speelpenning... |
| 41 |
./speelpenning >tmpfile 2>&1 |
| 42 |
grep "TEST PASSED" tmpfile 1>/dev/null 2>&1 |
| 43 |
if test $? = 0; then |
| 44 |
echo " " |
| 45 |
echo " Test passed!" |
| 46 |
echo " " |
| 47 |
else |
| 48 |
retval=-1 |
| 49 |
echo " " |
| 50 |
echo " ---- 8< ---- Start of test program output ---- 8< ----" |
| 51 |
cat tmpfile |
| 52 |
echo " ---- 8< ---- End of test program output ---- 8< ----" |
| 53 |
echo " " |
| 54 |
echo " ******** Test FAILED! ********" |
| 55 |
echo "Output of the test program is above." |
| 56 |
fi |
| 57 |
rm -rf tmpfile |
| 58 |
|
| 59 |
exit $retval |