From 84fa1931066092cdd8d4eed54945ac583090176b Mon Sep 17 00:00:00 2001 From: "bclary%bclary.com" Date: Tue, 27 Nov 2007 22:53:24 +0000 Subject: [PATCH] Sisyphus/JavaScript Tests - add option -S to runtests.sh to provide simpler output for Buildbot/Tinderbox, bug 397923, r=rcampbell git-svn-id: svn://10.0.0.236/trunk@239999 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/tests/runtests.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/mozilla/js/tests/runtests.sh b/mozilla/js/tests/runtests.sh index 723886b3634..01a02e41373 100755 --- a/mozilla/js/tests/runtests.sh +++ b/mozilla/js/tests/runtests.sh @@ -85,6 +85,8 @@ variable description If you wish to skip any build steps, simply specify a value not containing any of the build commands, e.g. 'none'. -v optional. verbose - copies log file output to stdout. +-S optional. summary - output tailered for use with + Buildbot|Tinderbox if an argument contains more than one value, it must be quoted. EOF @@ -93,7 +95,7 @@ EOF verbose=0 -while getopts "p:b:T:B:e:v" optname; +while getopts "p:b:T:B:e:vS" optname; do case $optname in p) products=$OPTARG;; @@ -104,6 +106,7 @@ while getopts "p:b:T:B:e:v" optname; B) buildcommands=$OPTARG;; v) verbose=1 verboseflag="-v";; + S) summary=1;; esac done @@ -196,7 +199,24 @@ for testlogfile in $testlogfiles; do if [[ -n "$DEBUG" ]]; then dumpvars branch buildtype testtype OSID testlogfile arch kernel outputprefix fi + $TEST_DIR/tests/mozilla.org/js/known-failures.pl -b $branch -T $buildtype -t $testtype -o "$OSID" -z `date +%z` -l $testlogfile -A "$arch" -K "$kernel" -r $TEST_JSDIR/failures.txt -O $outputprefix + + if [[ -n "$summary" ]]; then + + npass=`grep TEST_RESULT=PASSED ${outputprefix}-results-all.log | wc -l` + nfail=`wc -l ${outputprefix}-results-failures.log` + nfixes=`wc -l ${outputprefix}-results-possible-fixes.log` + nregressions=`wc -l ${outputprefix}-results-possible-regressions.log` + echo -e "\nJavaScript Test Failures:\n" + cat "${outputprefix}-results-failures.log" + echo -e "\nJavaScript Test Possible Fixes:\n" + cat "${outputprefix}-results-possible-fixes.log" + echo -e "\nJavaScript Test Possbile Regressions:\n" + cat "${outputprefix}-results-possible-regressions.log" + echo -e "\nTinderboxPrint: js tests $npass/$nfail
F:$nfixes
R:$nregressions" + + fi done