[Asterisk-code-review] pretty print: Update the result regex (testsuite[13.21])
George Joseph
asteriskteam at digium.com
Thu May 10 10:48:49 CDT 2018
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/8957
Change subject: pretty_print: Update the result regex
......................................................................
pretty_print: Update the result regex
Depending on teh branch of the testsuite being run, the test result
line may or may not have the name of the python module that actually
runs the test... Example:
Test ['./lib/python/asterisk/test_runner.py', 'tests/abc'] passed
or
Test ['tests/abc'] passed
This patch updates the regex that matches the test result to acount
for both situations.
Change-Id: I2349109d062629b97b2e2a5a40402395d7863448
---
M contrib/scripts/pretty_print
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/57/8957/1
diff --git a/contrib/scripts/pretty_print b/contrib/scripts/pretty_print
index d7df421..8ee22d8 100755
--- a/contrib/scripts/pretty_print
+++ b/contrib/scripts/pretty_print
@@ -145,10 +145,10 @@
fi
fi
- if [[ $line =~ ^Test\ *\[\'[^\']+\',\ *\'tests/([^\']+)\'(, \'[^\']+\')?\]\ *(passed|failed|timed\ out)$ ]] ; then
- test=${BASH_REMATCH[1]}
- _unused_arg=${BASH_REMATCH[2]}
- status=${BASH_REMATCH[3]}
+ if [[ $line =~ ^Test\ *\[(\'[^\']+\',)?\ *\'tests/([^\']+)\'(, \'[^\']+\')?\]\ *(passed|failed|timed\ out)$ ]] ; then
+ test=${BASH_REMATCH[2]}
+ _unused_arg=${BASH_REMATCH[3]}
+ status=${BASH_REMATCH[4]}
col=$(( ${TERM_WIDTH:-$(tput cols)} - ${#status_string} ))
et=$(( $SECONDS - $st ))
[ $countpid -gt 0 ] && kill $countpid
--
To view, visit https://gerrit.asterisk.org/8957
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: 13.21
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2349109d062629b97b2e2a5a40402395d7863448
Gerrit-Change-Number: 8957
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180510/4df3efac/attachment.html>
More information about the asterisk-code-review
mailing list