]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Make testsummary.sh print a list of failed system tests
authorMichał Kępień <michal@isc.org>
Thu, 22 Feb 2018 13:50:02 +0000 (14:50 +0100)
committerEvan Hunt <each@isc.org>
Tue, 27 Feb 2018 18:04:29 +0000 (10:04 -0800)
Print a list of failed system tests, if any, below the system test
summary to avoid the need to manually search through the test log.

(cherry picked from commit 28068857e75482848b67f3d06cb5f336d4cfd9d0)

bin/tests/system/testsummary.sh

index a87e03f6eda5df470ed91d31f9b17f1f0f6a3d53..c75cc0905102390089093fb36b99a90b59d5c2cb 100644 (file)
@@ -48,6 +48,12 @@ fi
 status=0
 echo "I:System test result summary:"
 grep 'R:[a-z0-9_-][a-z0-9_-]*:[A-Z][A-Z]*' systests.output | cut -d':' -f3 | sort | uniq -c | sed -e 's/^/I:/'
-grep 'R:[a-z0-9_-][a-z0-9_-]*:FAIL' systests.output > /dev/null && status=1
+
+FAILED_TESTS=`grep 'R:[a-z0-9_-][a-z0-9_-]*:FAIL' systests.output | cut -d':' -f2 | sort | sed -e 's/^/I:      /'`
+if [ -n "${FAILED_TESTS}" ]; then
+       echo "I:The following system tests failed:"
+       echo "${FAILED_TESTS}"
+       status=1
+fi
 
 exit $status