[Asterisk-code-review] Update pretty print to not look for asterisk version in output (testsuite[15])

Jenkins2 asteriskteam at digium.com
Wed Apr 4 05:15:51 CDT 2018


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

Change subject: Update pretty_print to not look for asterisk version in output
......................................................................

Update pretty_print to not look for asterisk version in output

This change is backwards compatible with all testsuite versions/branches.

Change-Id: Ibed22c46fc3b7bd71dffde93b900c6ed861eba8a
---
M contrib/scripts/pretty_print
1 file changed, 7 insertions(+), 6 deletions(-)

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



diff --git a/contrib/scripts/pretty_print b/contrib/scripts/pretty_print
index 200b0b3..d7df421 100755
--- a/contrib/scripts/pretty_print
+++ b/contrib/scripts/pretty_print
@@ -111,10 +111,10 @@
 	buffer+=("$line")
 
 	### 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]}
+	### The version may or may not not be present.
+	if [[ $line =~ ^Running\ tests\ for\ Asterisk[^\(]*\(run\ +([0-9]+)\ +of\ +([0-9]+)\)\.\.\. ]] ; then
+		run=${BASH_REMATCH[1]}
+		runs=${BASH_REMATCH[2]}
 	fi
 	### 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
@@ -145,9 +145,10 @@
 		fi
 	fi
 
-	if [[ $line =~ ^Test.*tests/([^\']+)\',.*(passed|failed|timed\ out)$ ]] ; then
+	if [[ $line =~ ^Test\ *\[\'[^\']+\',\ *\'tests/([^\']+)\'(, \'[^\']+\')?\]\ *(passed|failed|timed\ out)$ ]] ; then
 		test=${BASH_REMATCH[1]}
-		status=${BASH_REMATCH[2]}
+		_unused_arg=${BASH_REMATCH[2]}
+		status=${BASH_REMATCH[3]}
 		col=$(( ${TERM_WIDTH:-$(tput cols)} - ${#status_string} ))
 		et=$(( $SECONDS - $st ))
 		[ $countpid -gt 0 ] && kill $countpid

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

Gerrit-Project: testsuite
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibed22c46fc3b7bd71dffde93b900c6ed861eba8a
Gerrit-Change-Number: 8711
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180404/eae857bf/attachment.html>


More information about the asterisk-code-review mailing list