1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
#!/bin/sh
execdir="$PWD"
for f in $execdir/tests/*_test
do
# check that the filename exists. If there are no files,
# Bourne shell will treat $execdir/tests/*_test like a
# literal string!
[ -f "$f" ] || continue
echo "------------------------------------------------------"
echo "Running unit tests from file $f"
echo "------------------------------------------------------"
if [ -n "${PARVALGRINDOPTS+set}" ]
then
PARBINARY="valgrind $PARVALGRINDOPTS $f"
else
PARBINARY="$f"
fi
$PARBINARY || { echo "ERROR: $f failed." ; exit 1; } >&2
echo "------------------------------------------------------"
echo "Unit test complete for file $f"
echo "------------------------------------------------------"
done
for f in $execdir/tests/*_test.exe
do
# check that the filename exists. If there are no files,
# Bourne shell will treat $execdir/tests/*_test like a
# literal string!
[ -f "$f" ] || continue
echo "------------------------------------------------------"
echo "Running unit tests from file $f"
echo "------------------------------------------------------"
wine $f || { echo "ERROR: $f failed." ; exit 1; } >&2
echo "------------------------------------------------------"
echo "Unit test complete for file $f"
echo "------------------------------------------------------"
done
exit 0
|