From 467709ff38ac08be7b5bf127fabd32da26a95855 Mon Sep 17 00:00:00 2001 From: David Given Date: Fri, 2 Dec 2016 00:00:31 +0100 Subject: [PATCH] Report skipped, failed and timed out tests. --- first/testsummary.sh | 18 ++++++++++++++---- tests/plat/testdriver.sh | 4 ++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/first/testsummary.sh b/first/testsummary.sh index 4ad46d52d..be0842afa 100755 --- a/first/testsummary.sh +++ b/first/testsummary.sh @@ -1,11 +1,21 @@ #!/bin/sh -failed=$(find "$@" ! -size 0) +notsucceeding=$(find "$@" ! -size 0) 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 "" -for a in $failed; do +for a in $failed $timedout; do echo "**** $a" cat $a echo "" done -exec test "$failed" == "" +exec test "$failed" == "" -o "$timedout" == "" diff --git a/tests/plat/testdriver.sh b/tests/plat/testdriver.sh index a0fed5686..5e8e5b899 100755 --- a/tests/plat/testdriver.sh +++ b/tests/plat/testdriver.sh @@ -18,7 +18,7 @@ get_test_output() { qemu-system-*) if ! command -v $method >/dev/null 2>&1 ; then errcho "Warning: $method not installed, skipping test" - echo "@@SKIPPED" > $result + echo "@@SKIPPED" exit 0 fi @@ -33,7 +33,7 @@ get_test_output() { qemu-*) if ! command -v $method >/dev/null 2>&1 ; then errcho "Warning: $method not installed, skipping test" - echo "@@SKIPPED" > $result + echo "@@SKIPPED" exit 0 fi