#!/bin/bash -e # -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. if [[ -z "$TEST_DIR" ]]; then cat <&1 | tee -a $testlogfilelist testlogfiles="`grep '^log:' $testlogfilelist|sed 's|^log: ||'`" fatalerrors=`grep 'FATAL ERROR' $testlogfiles | cat` if [[ -n "$fatalerrors" ]]; then testlogarray=( $testlogfiles ) let itestlog=${#testlogarray[*]}-1 error "`tail -n 20 ${testlogarray[$itestlog]}`" $LINENO fi for testlogfile in $testlogfiles; do if [[ -n "$DEBUG" ]]; then dumpvars testlogfile fi case "$testlogfile" in *,js,*) testtype=shell;; *,firefox,*) testtype=browser;; *,thunderbird,*) testtype=browser;; *,fennec,*) testtype=browser;; *) error "unknown testtype in logfile $testlogfile" $LINENO;; esac case "$testlogfile" in *,opt,*) buildtype=opt;; *,debug,*) buildtype=debug;; *,nightly*) buildtype=opt;; *) error "unknown buildtype in logfile $testlogfile" $LINENO;; esac branch=`echo $testlogfile | sed 's|.*,\([0-9]\.[0-9]*\.[0-9]*\).*|\1|'` repo=`grep -m 1 '^environment: TEST_MOZILLA_HG=' $testlogfile | sed 's|.*TEST_MOZILLA_HG=http://hg.mozilla.org.*/\([^\/]*\)|\1|'` if [[ -z "$repo" ]]; then repo=CVS fi debug "repo=$repo" outputprefix=$testlogfile if [[ -n "$DEBUG" ]]; then dumpvars branch buildtype testtype OSID testlogfile TEST_PROCESSORTYPE TEST_KERNEL outputprefix fi if ! $TEST_DIR/tests/mozilla.org/js/known-failures.pl \ -b $branch \ -T $buildtype \ -R $repo \ -t $testtype \ -J "$javascriptoptions" \ -o "$OSID" \ -K "$TEST_KERNEL" \ -A "$TEST_PROCESSORTYPE" \ -M "$TEST_MEMORY" \ -z `date +%z` \ -l $testlogfile \ -r $TEST_JSDIR/failures.txt \ -O $outputprefix; then error "known-failures.pl" $LINENO fi if [[ -n "$summary" ]]; then # use let to work around mac problem where numbers were # output with leading characters. # if let's arg evaluates to 0, let will return 1 # so we need to test if let npass="`grep TEST_RESULT=PASSED ${outputprefix}-results-all.log | wc -l`"; then true; fi if let nfail="`cat ${outputprefix}-results-failures.log | wc -l`"; then true; fi if let nfixes="`cat ${outputprefix}-results-possible-fixes.log | wc -l`"; then true; fi if let nregressions="`cat ${outputprefix}-results-possible-regressions.log | wc -l`"; then true; fi echo -e "\nJavaScript Tests $branch $buildtype $testtype\n" echo -e "\nFailures:\n" cat "${outputprefix}-results-failures.log" echo -e "\nPossible Fixes:\n" cat "${outputprefix}-results-possible-fixes.log" echo -e "\nPossible Regressions:\n" cat "${outputprefix}-results-possible-regressions.log" echo -e "\nTinderboxPrint:
\n" echo -e "\nTinderboxPrint:js tests
$branch $buildtype $testtype
$npass/$nfail
F:$nfixes R:$nregressions" echo -e "\nTinderboxPrint:
\n" fi done