2016-12-01 22:03:30 +00:00
|
|
|
#!/bin/sh
|
|
|
|
echo ""
|
2016-12-01 23:00:31 +00:00
|
|
|
|
2018-06-23 09:14:40 +00:00
|
|
|
if [ "$1" = "" ]; then
|
|
|
|
echo "No tests."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-12-01 23:10:33 +00:00
|
|
|
succeeding="$(find "$@" -size 0)"
|
|
|
|
notsucceeding="$(find "$@" ! -size 0)"
|
2016-12-05 20:06:38 +00:00
|
|
|
if [ "$notsucceeding" != "" ]; then
|
|
|
|
skipped="$(grep -l @@SKIPPED $notsucceeding)"
|
|
|
|
timedout="$(grep -l @@TIMEDOUT $notsucceeding)"
|
|
|
|
failed="$(grep -l @@FAIL $notsucceeding)"
|
|
|
|
else
|
|
|
|
skipped=
|
|
|
|
timedout=
|
|
|
|
failed=
|
|
|
|
fi
|
2016-12-01 23:00:31 +00:00
|
|
|
|
|
|
|
for a in $failed $timedout; do
|
2016-12-01 22:03:30 +00:00
|
|
|
echo "**** $a"
|
|
|
|
cat $a
|
|
|
|
echo ""
|
|
|
|
done
|
2016-12-01 23:10:33 +00:00
|
|
|
|
2016-12-05 20:06:38 +00:00
|
|
|
echo "$(echo "$succeeding" | wc -w) tests passed"
|
|
|
|
echo "$(echo "$notsucceeding" | wc -w) tests failed to pass"
|
|
|
|
echo "$(echo "$skipped" | wc -w) were skipped (see build log for details)"
|
|
|
|
echo "$(echo "$timedout" | wc -w) timed out"
|
|
|
|
echo "$(echo "$failed" | wc -w) failed"
|
2016-12-01 23:10:33 +00:00
|
|
|
echo ""
|
|
|
|
|
2017-01-15 21:26:09 +00:00
|
|
|
if [ "$failed" != "" ]; then
|
|
|
|
echo "Failing test logs:"
|
|
|
|
for t in $failed; do
|
|
|
|
echo $t
|
|
|
|
done
|
2017-11-08 19:08:43 +00:00
|
|
|
fi
|
|
|
|
if [ "$timedout" != "" ]; then
|
|
|
|
echo "Timed-out test logs:"
|
|
|
|
for t in $timedout; do
|
|
|
|
echo $t
|
|
|
|
done
|
2017-01-15 21:26:09 +00:00
|
|
|
fi
|
2016-12-01 23:10:33 +00:00
|
|
|
if [ "$failed" != "" -o "$timedout" != "" ]; then
|
|
|
|
echo "Test status: SAD FACE (tests are failing)"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ "$succeeding" = "" ]; then
|
|
|
|
echo "Test status: PUZZLED FACE (all tests were skipped)"
|
2016-12-01 23:14:40 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
if [ "$skipped" != "" ]; then
|
|
|
|
echo "Test status: MILDLY PLEASED FACE (some tests were skipped, but the rest pass)"
|
2016-12-01 23:18:44 +00:00
|
|
|
exit 0
|
2016-12-01 23:10:33 +00:00
|
|
|
fi
|
|
|
|
echo "Test status: HAPPY FACE (all tests are passing)"
|
|
|
|
exit 0
|
|
|
|
|