[asterisk-commits] testsuite: Update pretty print to handle the new runtests --... (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 11 07:36:37 CST 2015
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: testsuite: Update pretty_print to handle the new runtests --number option
......................................................................
testsuite: Update pretty_print to handle the new runtests --number option
Change-Id: I437aae3e6e13a6cee1826f3f468257e27edcc0f4
---
M contrib/scripts/pretty_print
1 file changed, 24 insertions(+), 19 deletions(-)
Approvals:
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/contrib/scripts/pretty_print b/contrib/scripts/pretty_print
index 65e0656..7174287 100755
--- a/contrib/scripts/pretty_print
+++ b/contrib/scripts/pretty_print
@@ -13,15 +13,6 @@
exit 1
fi
-declare -ix runnable=0
-declare -ix total=0
-declare -ix passed=0
-declare -ix failed=0
-declare -ix timedout=0
-declare -ix tests=0
-declare -ix maxelapsed=0
-declare -a failures
-declare -a timeouts
declare -ix test_timeout=0
YELLOW='\033[01;33m'
GREEN='\033[01;32m'
@@ -50,6 +41,16 @@
trap 'kill $countpid &>/dev/null' INT ERR
while read line ; do
if [[ $line =~ ^Running.tests.for.(Asterisk.*) ]] ; then
+ declare -ix runnable=0
+ declare -ix total=0
+ declare -ix passed=0
+ declare -ix failed=0
+ declare -ix timedout=0
+ declare -ix tests=0
+ declare -ix maxelapsed=0
+ declare -a failures
+ declare -a timeouts
+
version=${BASH_REMATCH[1]}
starttime=$SECONDS
fi
@@ -57,6 +58,7 @@
if [[ $line =~ ^Tests.to.run:.([0-9]+),[\ ]+Maximum.test.inactivity.time:.([0-9-]+) ]] ; then
runnable=${BASH_REMATCH[1]}
export test_timeout=${BASH_REMATCH[2]}
+ echo =============================================================
echo ${line/-1/unlimited}
printf "[%-*.*s ][%-11s][%s][${GREEN}%4s${NORM}][${RED}%4s${NORM}]\n" $col $col "Test" " Test" "Status" "Pass" "Fail"
fi
@@ -99,22 +101,25 @@
kill $countpid
printf "[${COLOR}%s${NORM}][${GREEN}%4d${NORM}][${RED}%4d${NORM}]\n" $label $passed $failed
fi
+
+ if [[ $line =~ TEST\ RESULTS ]] ; then
+ for fail in "${failures[@]}" ; do
+ echo -e "${RED}$fail${NORM}"
+ done
+ for to in "${timeouts[@]}" ; do
+ echo -e "${YELLOW}$to${NORM}"
+ done
+
+ elapsed=$(( $SECONDS - $starttime ))
+ time="$(( $elapsed / 60 ))m $(( $elapsed % 60 ))s"
+ echo -e "Tests: $runnable ${GREEN}Passed: $passed ${RED}Failed: $failed TimedOut: $timedout${NORM} Time: $time\tLongest test: ${maxelapsed}s"
+ fi
done
trap - INT ERR
kill $countpid &>/dev/null
-for fail in "${failures[@]}" ; do
- echo -e "${RED}$fail${NORM}"
-done
-for to in "${timeouts[@]}" ; do
- echo -e "${YELLOW}$to${NORM}"
-done
-
-elapsed=$(( $SECONDS - $starttime ))
-time="$(( $elapsed / 60 ))m $(( $elapsed % 60 ))s"
-echo -e "Tests: $runnable ${GREEN}Passed: $passed ${RED}Failed: $failed TimedOut: $timedout${NORM} Time: $time\tLongest test: ${maxelapsed}s"
--
To view, visit https://gerrit.asterisk.org/1534
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I437aae3e6e13a6cee1826f3f468257e27edcc0f4
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-commits
mailing list