]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Tweak the regular expression used for extracting system test results
authorMichał Kępień <michal@isc.org>
Thu, 22 Feb 2018 13:07:17 +0000 (14:07 +0100)
committerMichał Kępień <michal@isc.org>
Tue, 27 Feb 2018 07:59:51 +0000 (08:59 +0100)
The current regular expression used for extracting system test results
from systests.output, "^R:", is anchored at the start of a line, which
prevents colored system test output from being properly processed.  As
just "R:" would arguably be too general, extend the pattern a bit to
ensure it will only match lines containing system test results.

bin/tests/system/testsummary.sh

index 1f4a0dacd08bcf7898598f2b2d4c09f6144e5827..d1162f6923b0a2f21cc585e195533c9e8c11065f 100644 (file)
@@ -42,7 +42,7 @@ fi
 
 status=0
 echo "I:System test result summary:"
-grep '^R:' systests.output | cut -d':' -f3 | sort | uniq -c | sed -e 's/^/I:/'
-grep '^R:[^:]*:FAIL' systests.output > /dev/null && status=1
+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
 
 exit $status