[Asterisk-code-review] pretty print: Fix regexes (testsuite[master])

Jenkins2 asteriskteam at digium.com
Thu May 11 16:58:24 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5611 )

Change subject: pretty_print:  Fix regexes
......................................................................


pretty_print:  Fix regexes

The regexes were failing when the asterisk branch was "master".

Change-Id: I264ca00e9b6de77877ea100822b36600f4d87dd0
---
M contrib/scripts/pretty_print
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/contrib/scripts/pretty_print b/contrib/scripts/pretty_print
index 051f6ea..5544652 100755
--- a/contrib/scripts/pretty_print
+++ b/contrib/scripts/pretty_print
@@ -56,13 +56,14 @@
 
 trap 'kill $countpid &>/dev/null' INT ERR
 while read line ; do
-	if [[ $line =~ ^Running.tests.for.(Asterisk[^\s]+)[\ ]+\(run[\ ]+([0-9]+)[\ ]+of[\ ]+([0-9]+)\)\.\.\. ]] ; then
+	### Running tests for Asterisk GIT-master-99dea9b (run 1 of 1)...
+	if [[ $line =~ ^Running\ tests\ for\ (Asterisk\ +[^\ ]+)\ +\(run\ +([0-9]+)\ +of\ +([0-9]+)\)\.\.\. ]] ; then
 		run=${BASH_REMATCH[2]}
 		runs=${BASH_REMATCH[3]}
 		version=${BASH_REMATCH[1]}
 	fi
-
-	if [[ $run -eq 1 && $line =~ ^Tests.to.run:[\ ]+([0-9]+)[\ ]+.[\ ]+([0-9]+)[\ ]+time\(s\)[\ ]+=[\ ]+([0-9]+)[\ ]+Maximum.test.inactivity.time:.([0-9-]+) ]] ; then
+	### Tests to run: 11 * 1 time(s) = 11  Maximum test inactivity time: 120 sec.
+	if [[ $run -eq 1 && $line =~ ^Tests\ to\ run:\ +([0-9]+)\ +\*\ +([0-9]+)\ +time\(s\)\ +=\ +([0-9]+)\ +Maximum.test.inactivity.time:.([-0-9-]+) ]] ; then
 		runnable=$(( ${BASH_REMATCH[1]} * $runs ))
 		export test_timeout=${BASH_REMATCH[4]}
 		echo ===========================================================================================

-- 
To view, visit https://gerrit.asterisk.org/5611
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I264ca00e9b6de77877ea100822b36600f4d87dd0
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list