Report skipped, failed and timed out tests.

This commit is contained in:
David Given 2016-12-02 00:00:31 +01:00
parent 9e6581b0ff
commit 467709ff38
2 changed files with 16 additions and 6 deletions

View file

@ -1,11 +1,21 @@
#!/bin/sh #!/bin/sh
failed=$(find "$@" ! -size 0) notsucceeding=$(find "$@" ! -size 0)
echo "" echo ""
echo "$(echo $failed | wc -w) failed tests" echo "$(echo $notsucceeding | wc -w) tests failed to pass"
skipped=$(grep -l @@SKIPPED $notsucceeding)
echo "$(echo $skipped | wc -w) were skipped (see build log for details)"
timedout=$(grep -l @@TIMEDOUT $notsucceeding)
echo "$(echo $timedout | wc -w) timed out"
failed=$(grep -l @@FAIL $notsucceeding)
echo "$(echo $failed | wc -w) failed"
echo "" echo ""
for a in $failed; do for a in $failed $timedout; do
echo "**** $a" echo "**** $a"
cat $a cat $a
echo "" echo ""
done done
exec test "$failed" == "" exec test "$failed" == "" -o "$timedout" == ""

View file

@ -18,7 +18,7 @@ get_test_output() {
qemu-system-*) qemu-system-*)
if ! command -v $method >/dev/null 2>&1 ; then if ! command -v $method >/dev/null 2>&1 ; then
errcho "Warning: $method not installed, skipping test" errcho "Warning: $method not installed, skipping test"
echo "@@SKIPPED" > $result echo "@@SKIPPED"
exit 0 exit 0
fi fi
@ -33,7 +33,7 @@ get_test_output() {
qemu-*) qemu-*)
if ! command -v $method >/dev/null 2>&1 ; then if ! command -v $method >/dev/null 2>&1 ; then
errcho "Warning: $method not installed, skipping test" errcho "Warning: $method not installed, skipping test"
echo "@@SKIPPED" > $result echo "@@SKIPPED"
exit 0 exit 0
fi fi