]> 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)
committerEvan Hunt <each@isc.org>
Tue, 27 Feb 2018 18:04:29 +0000 (10:04 -0800)
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.

(cherry picked from commit 9006d6dbbdad0bd2969c401e1e6bb468ffc85324)

bin/tests/system/testsummary.sh

index b585a2f6f0c5dd11cbe8b3ea9a6d438d66880fea..a87e03f6eda5df470ed91d31f9b17f1f0f6a3d53 100644 (file)
@@ -47,7 +47,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