[asterisk-commits] gtjoseph: testsuite/asterisk/trunk r6099 - /asterisk/trunk/contrib/scripts/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 15 11:52:26 CST 2014


Author: gtjoseph
Date: Mon Dec 15 11:52:23 2014
New Revision: 6099

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6099
Log:
pretty_print: Minor tweaks to elapsed time calc

The maximum test time summary now doesn't include the
times of timed out tests.

Tested-by: George Joseph


Modified:
    asterisk/trunk/contrib/scripts/pretty_print

Modified: asterisk/trunk/contrib/scripts/pretty_print
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/contrib/scripts/pretty_print?view=diff&rev=6099&r1=6098&r2=6099
==============================================================================
--- asterisk/trunk/contrib/scripts/pretty_print (original)
+++ asterisk/trunk/contrib/scripts/pretty_print Mon Dec 15 11:52:23 2014
@@ -74,16 +74,20 @@
 		test=${BASH_REMATCH[1]}
 		status=${BASH_REMATCH[2]}
 		col=$(( $(tput cols) - 36 ))
+		et=$(( $SECONDS - $st ))
+
 		if [[ $status = passed ]] ; then
 			(( passed++ ))
 			COLOR=${GREEN}
 			label=Passed
+			[[ $et -gt $maxelapsed ]] && maxelapsed=$et
 		fi
 		if [[ $status = failed ]] ; then
 			(( failed++ ))
 			COLOR=${RED}
 			label=Failed
 			failures+=("FAILED: $test")
+			[[ $et -gt $maxelapsed ]] && maxelapsed=$et
 		fi
 		if [[ $status = timedout ]] ; then
 			(( failed++ ))
@@ -93,8 +97,6 @@
 			timeouts+=("TIMEDOUT: $test")
 		fi
 		kill $countpid
-		et=$(( $SECONDS - $st ))
-		[[ $et -gt $maxelapsed ]] && maxelapsed=$et
 		printf "[${COLOR}%s${NORM}][${GREEN}%4d${NORM}][${RED}%4d${NORM}]\n" $label $passed $failed
 	fi
 done




More information about the asterisk-commits mailing list