gecko-dev/js/tests/sisyphus-javascript.patch

4578 lines
179 KiB
Diff

Index: Makefile
===================================================================
RCS file: /cvsroot/mozilla/js/tests/Makefile,v
retrieving revision 1.16
diff -p -U 8 -r1.16 Makefile
--- Makefile 6 Feb 2008 20:06:39 -0000 1.16
+++ Makefile 25 Jun 2008 17:31:15 -0000
@@ -17,21 +17,19 @@ spidermonkey-extensions-n.tests: $(TEST_
find . -name '*.js' | grep -v shell.js | grep -v browser.js | grep '/extensions/' | sed 's|\.\/||' | sort > $@
menu-list.txt:
echo "http://$(TEST_HTTP)/tests/mozilla.org/$(JSDIR)/menu.html" > menu-list.txt
confidential-failures.txt:
touch confidential-failures.txt
-failures.txt: public-failures.txt confidential-failures.txt
- cp public-failures.txt public-failures.txt.save
- cp confidential-failures.txt confidential-failures.txt.save
- sort < public-failures.txt | uniq | ./create-patterns.pl > public-failures.$$
- mv public-failures.$$ public-failures.txt
- sort < confidential-failures.txt | uniq | ./create-patterns.pl > confidential-failures.$$
- mv confidential-failures.$$ confidential-failures.txt
- cat public-failures.txt confidential-failures.txt | sort | uniq > failures.txt
+public-failures.txt.expanded: public-failures.txt universe.data
+ pattern-expander.pl public-failures.txt > public-failures.txt.expanded
-clean:
- rm -f menubody.html menu.html menu-list.txt failures.txt excluded-*.tests included-*.tests urllist*.html urllist*.tests
+confidential-failures.txt.expanded: confidential-failures.txt universe.data
+ pattern-expander.pl confidential-failures.txt > confidential-failures.txt.expanded
+failures.txt: public-failures.txt.expanded confidential-failures.txt.expanded
+ sort -u public-failures.txt.expanded confidential-failures.txt.expanded > failures.txt
+clean:
+ rm -f menubody.html menu.html menu-list.txt failures.txt *failures.txt.expanded excluded-*.tests included-*.tests urllist*.html urllist*.tests
Index: Patterns.pm
===================================================================
RCS file: Patterns.pm
diff -N Patterns.pm
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Patterns.pm 25 Jun 2008 17:31:15 -0000
@@ -0,0 +1,223 @@
+# -*- Mode: Perl; tab-width: 4; indent-tabs-mode: nil; -*-
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla JavaScript Testing Utilities
+#
+# The Initial Developer of the Original Code is
+# Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bob Clary <bclary@bclary.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+package Patterns;
+
+sub getuniversekey
+{
+ my ($machinerecord, $excludeduniversefield) = @_;
+ my $i;
+ my $key = '';
+
+# dbg("getuniversekey: \$machinerecord=" . recordtostring($machinerecord) . ", \$excludeduniversefield=$excludeduniversefield");
+
+ for ($i = 0; $i < @universefields; $i++)
+ {
+# dbg("getuniversekey: \$universefields[$i]=$universefields[$i]");
+
+ if ($universefields[$i] ne $excludeduniversefield)
+ {
+ $key .= $machinerecord->{$universefields[$i]}
+ }
+ }
+
+# dbg("getuniversekey=$key");
+
+ return $key;
+}
+
+sub getuniverse
+{
+ my ($universekey, $excludeduniversefield) = @_;
+ my $i;
+ my $value;
+ my $testrun;
+ my @universe = ();
+ my %universehash = ();
+
+ dbg("getuniverse: \$universekey=$universekey, \$excludeduniversefield=$excludeduniversefield");
+
+ for ($i = 0; $i < @testruns; $i++)
+ {
+ $testrun = $testruns[$i];
+# dbg("getuniverse: \$testruns[$i]=" . recordtostring($testrun));
+ $testrununiversekey = getuniversekey($testrun, $excludeduniversefield);
+# dbg("getuniverse: \$testrununiversekey=$testrununiversekey");
+ if ($testrununiversekey =~ /$universekey/)
+ {
+# dbg("getuniverse: matched \$testrununiversekey=$testrununiversekey to \$universekey=$universekey");
+ $value = $testrun->{$excludeduniversefield};
+
+# dbg("getuniverse: \$testrun->{$excludeduniversefield}=$value");
+
+ if (! $universehash{$value} )
+ {
+# dbg("getuniverse: pushing $value");
+ push @universe, ($value);
+ $universehash{$value} = 1;
+ }
+ }
+ }
+ @universe = sort @universe;
+ dbg("getuniverse=" . join(',', @universe));
+ return @universe;
+}
+
+sub recordtostring
+{
+ my ($record) = @_;
+ my $j;
+ my $line = '';
+ my $field;
+
+ for ($j = 0; $j < @recordfields - 1; $j++)
+ {
+ $field = $recordfields[$j];
+# dbg("recordtostring: \$field=$field, \$record->{$field}=$record->{$field}");
+ $line .= "$field=$record->{$field}, ";
+ }
+ $field = $recordfields[$#recordfields];
+# dbg("recordtodtring: \$field=$field, \$record->{$field}= $record->{$field}");
+ $line .= "$field=$record->{$field}";
+
+ return $line;
+}
+
+sub dumprecords
+{
+ my $record;
+ my $line;
+ my $prevline = '';
+ my $i;
+
+ dbg("dumping records");
+
+# @records = sort sortrecords @records;
+
+ for ($i = 0; $i < @records; $i++)
+ {
+ $record = $records[$i];
+ $line = recordtostring($record);
+ if ($line eq $prevline)
+ {
+# dbg("DUPLICATE $line") if ($DEBUG);
+ }
+ else
+ {
+ print "$line\n";
+ $prevline = $line;
+ }
+ }
+}
+
+sub sortrecords
+{
+ return recordtostring($a) cmp recordtostring($b);
+}
+
+sub dbg
+{
+ if ($DEBUG)
+ {
+ print STDERR "DEBUG: " . join(" ", @_) . "\n";
+ }
+}
+
+sub copyreference
+{
+ my ($fromreference) = @_;
+ my $toreference = {};
+ my $key;
+
+ foreach $key (keys %{$fromreference})
+ {
+ $toreference->{$key} = $fromreference->{$key};
+ }
+ return $toreference;
+}
+
+#my @recordfields;
+#my @universefields;
+#my %machines;
+#my @testruns;
+
+
+BEGIN
+{
+ dbg("begin");
+
+ my $test_dir = $ENV{TEST_DIR} || "/work/mozilla/mozilla.com/test.mozilla.com/www";
+
+ $DEBUG = $ENV{DEBUG};
+
+ @recordfields = ('TEST_ID', 'TEST_BRANCH', 'TEST_BUILDTYPE', 'TEST_TYPE', 'TEST_OS', 'TEST_KERNEL', 'TEST_PROCESSORTYPE', 'TEST_MEMORY', 'TEST_CPUSPEED', 'TEST_TIMEZONE', 'TEST_RESULT', 'TEST_EXITSTATUS', 'TEST_DESCRIPTION');
+ @sortkeyfields = ('TEST_ID', 'TEST_RESULT', 'TEST_EXITSTATUS', 'TEST_DESCRIPTION', 'TEST_BRANCH', 'TEST_BUILDTYPE', 'TEST_TYPE', 'TEST_OS', 'TEST_KERNEL', 'TEST_PROCESSORTYPE', 'TEST_MEMORY', 'TEST_CPUSPEED', 'TEST_TIMEZONE', );
+ @universefields = ('TEST_BRANCH', 'TEST_BUILDTYPE', 'TEST_TYPE', 'TEST_OS', 'TEST_KERNEL', 'TEST_PROCESSORTYPE', 'TEST_MEMORY', 'TEST_CPUSPEED', 'TEST_TIMEZONE');
+
+ @records = ();
+
+ @testruns = ();
+
+ open TESTRUNS, "<$test_dir/tests/mozilla.org/js/universe.data" or die "$?";
+
+ while (<TESTRUNS>) {
+
+ chomp;
+
+ my $record = {};
+
+ my ($test_os, $test_kernel, $test_processortype, $test_memory, $test_cpuspeed, $test_timezone, $test_branch, $test_buildtype, $test_type) = $_ =~
+ /^TEST_OS=([^,]*), TEST_KERNEL=([^,]*), TEST_PROCESSORTYPE=([^,]*), TEST_MEMORY=([^,]*), TEST_CPUSPEED=([^,]*), TEST_TIMEZONE=([^,]*), TEST_BRANCH=([^,]*), TEST_BUILDTYPE=([^,]*), TEST_TYPE=([^,]*)/;
+
+ $record->{TEST_BRANCH} = $test_branch;
+ $record->{TEST_BUILDTYPE} = $test_buildtype;
+ $record->{TEST_TYPE} = $test_type;
+ $record->{TEST_OS} = $test_os;
+ $record->{TEST_KERNEL} = $test_kernel;
+ $record->{TEST_PROCESSORTYPE} = $test_processortype;
+ $record->{TEST_MEMORY} = $test_memory;
+ $record->{TEST_CPUSPEED} = $test_cpuspeed;
+ $record->{TEST_TIMEZONE} = $test_timezone;
+
+ push @testruns, ($record);
+ }
+
+ close TESTRUNS;
+
+}
+
+1;
Index: changes.sh
===================================================================
RCS file: changes.sh
diff -N changes.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ changes.sh 25 Jun 2008 17:31:15 -0000
@@ -0,0 +1,120 @@
+#!/bin/bash
+# -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
+
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla JavaScript Testing Utilities
+#
+# The Initial Developer of the Original Code is
+# Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bob Clary <bclary@bclary.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# usage: changes.sh [prefix]
+#
+# combines the {prefix}*possible-fixes.log files into {prefix}possible-fixes.log
+# and {prefix}*possible-regressions.log files into
+# possible-regressions.log.
+#
+# This script is useful in cases where log files from different machines, branches
+# and builds are being investigated.
+
+if cat /dev/null | sed -r 'q' > /dev/null 2>&1; then
+ SED="sed -r"
+elif cat /dev/null | sed -E 'q' > /dev/null 2>&1; then
+ SED="sed -E"
+else
+ echo "Neither sed -r or sed -E is supported"
+ exit 2
+fi
+
+workfile=`mktemp work.XXXXXXXX`
+if [ $? -ne 0 ]; then
+ echo "Unable to create working temp file"
+ exit 2
+fi
+
+for f in ${1}*results-possible-fixes.log*; do
+ case $f in
+ *.log)
+ CAT=cat
+ ;;
+ *.log.bz2)
+ CAT=bzcat
+ ;;
+ *.log.gz)
+ CAT=zcat
+ ;;
+ *.log.zip)
+ CAT="unzip -c"
+ ;;
+ *)
+ echo "unknown log type: $f"
+ exit 2
+ ;;
+ esac
+
+ $CAT $f | $SED "s|$|:$f|" >> $workfile
+
+done
+
+sort -u $workfile > ${1}possible-fixes.log
+
+rm $workfile
+
+
+for f in ${1}*results-possible-regressions.log*; do
+ case $f in
+ *.log)
+ CAT=cat
+ ;;
+ *.log.bz2)
+ CAT=bzcat
+ ;;
+ *.log.gz)
+ CAT=zcat
+ ;;
+ *.log.zip)
+ CAT="unzip -c"
+ ;;
+ *)
+ echo "unknown log type: $f"
+ exit 2
+ ;;
+ esac
+ $CAT $f >> $workfile
+done
+
+sort -u $workfile > ${1}possible-regressions.log
+
+rm $workfile
+
+
+
Index: create-patterns.pl
===================================================================
RCS file: create-patterns.pl
diff -N create-patterns.pl
--- create-patterns.pl 1 Oct 2007 19:10:41 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,264 +0,0 @@
-#!/usr/bin/perl
-# -*- Mode: Perl; tab-width: 4; indent-tabs-mode: nil; -*-
-
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla JavaScript Testing Utilities
-#
-# The Initial Developer of the Original Code is
-# Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s): Bob Clary <bclary@bclary.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-# make stderr, stdout unbuffered
-
-select STDERR; $| = 1;
-select STDOUT; $| = 1;
-
-my $regchars = '\[\^\-\]\|\{\}\?\*\+\.\<\>\$\(\)';
-
-sub escape_patterns;
-sub unescape_patterns;
-sub debug;
-
-my $debug = $ENV{DEBUG};
-my @outputlines = ();
-my @inputlines = ();
-
-while (<ARGV>) {
- chomp;
-
- # remove irrelevant data the caller is required to remove any
- # other data which should not be considered during the
- # consolidation such as TEST_MACHINE, etc.
-
- s/TEST_DATE=[^,]*,/TEST_DATE=.*,/;
-
- push @inputlines, ($_);
-
-}
-
-my @fieldnames = ('TEST_BRANCH', 'TEST_BUILDTYPE', 'TEST_TYPE', 'TEST_OS', 'TEST_PROCESSORTYPE', 'TEST_KERNEL', 'TEST_TIMEZONE');
-
-my $pass = 0;
-my $changed = 1;
-
-while ($changed) {
-
- # repeated loop until no changes are made.
-
- ++$pass;
- $changed = 0;
-
- debug "pass $pass, " . ($#inputlines + 1) . " inputlines, " . ($#outputlines + 1) . " outputlines\n";
-
- foreach $field (@fieldnames) {
-
- debug "pass $pass, processing $field, " . ($#inputlines + 1) . " inputlines, " . ($#outputlines + 1) . " outputlines\n";
-
- # process each field across all lines so that later consolidations
- # will match consolidated field values
-
- while ($inputline = shift(@inputlines)) {
-
- debug "inputline $inputline\n";
-
- # get the current field value from the current input line
-
- ($inputvalue) = $inputline =~ /$field=\(?([^,\)]*)\)?,/;
-
- if ($inputvalue eq '.*') {
-
- # if the current input value is the any wildcard,
- # then there is no need to perform a consolidation
- # on the field.
-
- push @outputlines, ($inputline);
-
- next;
- }
-
- # turn "off" any regular expression characters in the input line
-
- $pattern = escape_pattern($inputline);
-
- # Make the current field in the current pattern an any
- # wildcard so that it will match any value. We are looking
- # for all other lines that only differ from the current line by
- # the current field value
-
- $pattern =~ s/$field=[^,]*,/$field=.*,/;
-
- # find the matches to the current pattern
-
- debug "pattern: $pattern\n";
-
- @matched = grep /$pattern/, (@inputlines, @outputlines);
- @unmatched = grep !/$pattern/, @inputlines;
-
- debug "" . ($#matched + 1) . " matched, " . ($#unmatched + 1) . " unmatched, " . ($#inputlines + 1) . " inputlines, " . ($#outputlines + 1) . " outputlines\n";
-
- if (@matched) {
-
- # the input line matched others
-
- $outputvalue = $inputvalue;
-
- foreach $matchline (@matched) {
-
- ($matchvalue) = $matchline =~ /$field=\(?([^,\)]*)\)?,/;
-
- if ( $inputvalue !~ /$matchvalue/ && $matchvalue !~ /$inputvalue/) {
-
- # the current match value and input value
- # do not overlap so add the match
- # field value as regular expression
- # alternation | to the current field value
-
- debug "adding regexp alternation to $field: inputvalue: $inputvalue, matchvalue: $matchvalue";
-
- $outputvalue .= "|$matchvalue";
- }
- } # foreach matchline
-
- # replace the current inputs field value with the
- # consolidated value
-
- if ($outputvalue =~ /\|/) {
- $outputvalue = "(" . join('|', sort(split(/\|/, $outputvalue))) . ")";
- }
- $inputline =~ s/$field=[^,]*,/$field=$outputvalue,/;
- debug "$inputline\n";
-
- $changes = 1;
- }
- push @outputlines, ($inputline);
-
- @inputlines = @unmatched;
-
- } # while inputline
-
- @inputlines = @outputlines;
- @outputlines = ();
-
- } # foreach field
-}
-
-@inputlines = sort @inputlines;
-
-my $output = join"\n", @inputlines;
-
-debug "output: " . ($#inputlines + 1) . " lines\n";
-
-print "$output\n";
-
-### # look for over specified failures
-###
-### $field = 'TEST_DESCRIPTION';
-###
-### while ($inputline = shift(@inputlines)) {
-###
-### debug "inputline $inputline\n";
-###
-### # turn "off" any regular expression characters in the input line
-###
-### $pattern = escape_pattern($inputline);
-###
-### # Make the TEST_DESCRIPTION field in the current pattern an any
-### # wildcard so that it will match any value. We are looking
-### # for all other lines that only differ from the current line by
-### # the TEST_DESCRIPTION. These will be the potentially overspecified
-### # failures.
-###
-### $pattern =~ s/$field=[^,]*,/$field=.*,/;
-###
-### # find the matches to the current pattern
-###
-### debug "pattern: $pattern\n";
-###
-### @matched = grep /$pattern/, @inputlines;
-### @unmatched = grep !/$pattern/, @inputlines;
-###
-### debug "" . ($#matched + 1) . " matched, " . ($#unmatched + 1) . " unmatched, " . ($#inputlines + 1) . " inputlines, " . ($#outputlines + 1) . " outputlines\n";
-###
-### if (@matched) {
-###
-### # the inputline overspecifies an error
-###
-### push @matched, ($inputline);
-###
-### foreach $matchline (@matched) {
-###
-### print STDERR "OVERSPECIFIED? : $matchline\n";
-###
-### } # foreach matchline
-###
-### }
-###
-### @inputlines = @unmatched;
-###
-### } # while inputline
-###
-
-
-
-sub escape_pattern {
-
- # unlike the known-failures.pl, this escape escapes the entire
- # line to make it not contain any active regular expression patterns
- # so that any matched will be literal and not regular
- my $line = shift;
-
- chomp;
-
- # replace unescaped regular expression characters in the
- # description so they are not interpreted as regexp chars
- # when matching descriptions. leave the escaped regexp chars
- # `regexp alone so they can be unescaped later and used in
- # pattern matching.
-
- # see perldoc perlre
-
- $line =~ s/\\/\\\\/g;
-
- # escape regexpchars
- $line =~ s/([$regchars])/\\$1/g;
-
- return "$line";
-
-}
-
-sub debug {
- my $msg;
- if ($debug) {
- $msg = shift;
- print "DEBUG: $msg\n";
- }
-}
Index: get-universe.sh
===================================================================
RCS file: get-universe.sh
diff -N get-universe.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ get-universe.sh 25 Jun 2008 17:31:15 -0000
@@ -0,0 +1,48 @@
+#!/bin/bash -e
+# -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
+
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla JavaScript Testing Utilities
+#
+# The Initial Developer of the Original Code is
+# Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bob Clary <bclary@bclary.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# usage: get-universe.sh logfile(s) > universe.data
+#
+# get-universe.sh reads the processed javascript logs and writes to
+# stdout the unique set of fields to be used as the "universe" of test
+# run data. These values are used by pattern-expander.pl and
+# pattern-extracter.pl to encode the known failure files into regular
+# expressions.
+
+sed 's|.*\(TEST_BRANCH.*\), \(TEST_OS.*\), TEST_RESULT.*|\2, \1|' $@ | sort -u
Index: known-failures.pl
===================================================================
RCS file: /cvsroot/mozilla/js/tests/known-failures.pl,v
retrieving revision 1.5
diff -p -U 8 -r1.5 known-failures.pl
--- known-failures.pl 23 Mar 2008 21:42:44 -0000 1.5
+++ known-failures.pl 25 Jun 2008 17:31:16 -0000
@@ -44,30 +44,32 @@ use Getopt::Mixed "nextOption";
sub debug;
sub usage;
sub parse_options;
sub escape_pattern;
sub unescape_pattern;
# option arguments
-my $option_desc = "b=s branch>b T=s buildtype>T t=s testtype>t l=s rawlogfile>l f=s failurelogfile>f o=s os>o r=s patterns>r z=s timezone>z O=s outputprefix>O A=s arch>A K=s kernel>K D debug>D";
+my $option_desc = "b=s branch>b T=s buildtype>T t=s testtype>t o=s os>o K=s kernel>K A=s arch>A M=s memory>M S=s speed>S z=s timezone>z l=s rawlogfile>l f=s failurelogfile>f r=s patterns>r O=s outputprefix>O D debug>D";
my $testid;
my $branch;
my $buildtype;
my $testtype;
my $rawlogfile;
my $failurelogfile;
my $os;
my $patterns;
my $timezone;
my $outputprefix;
my $arch;
my $kernel;
+my $memory;
+my $cpuspeed;
my $debug = $ENV{DEBUG};
# pattern variables
my $knownfailurebranchpattern;
my $failurebranchpattern;
my $knownfailureospattern;
my $failureospattern;
@@ -76,16 +78,20 @@ my $failurebuildtypepattern;
my $knownfailuretesttypepattern;
my $failuretesttypepattern;
my $knownfailuretimezonepattern;
my $failuretimezonepattern;
my $knownfailurearchpattern;
my $failurearchpattern;
my $knownfailurekernelpattern;
my $failurekernelpattern;
+my $knownfailurememorypattern;
+my $failurememorypattern;
+my $knownfailurecpuspeedpattern;
+my $failurecpuspeedpattern;
my @patterns;
my $pattern;
my @failures;
my @fixes;
my @excludedtests;
my $excludedtest;
my $excludedfile;
@@ -139,44 +145,44 @@ foreach $includedfile ( @includedfiles )
s/\s+$//;
$includedtests{$_} = 1;
}
close INCLUDED;
}
debug "loading patterns $patterns";
-debug "pattern filter: /^TEST_ID=[^,]*, TEST_BRANCH=$knownfailurebranchpattern, TEST_RESULT=[^,]*, TEST_BUILDTYPE=$knownfailurebuildtypepattern, TEST_TYPE=$knownfailuretesttypepattern, TEST_OS=$knownfailureospattern, TEST_MACHINE=[^,]*, TEST_PROCESSORTYPE=$knownfailurearchpattern, TEST_KERNEL=$knownfailurekernelpattern, TEST_DATE=[^,]*, TEST_TIMEZONE=$knownfailuretimezonepattern,/\n";
+debug "pattern filter: ^TEST_ID=[^,]*, TEST_BRANCH=$knownfailurebranchpattern, TEST_BUILDTYPE=$knownfailurebuildtypepattern, TEST_TYPE=$knownfailuretesttypepattern, TEST_OS=$knownfailureospattern, TEST_KERNEL=$knownfailurekernelpattern, TEST_PROCESSORTYPE=$knownfailurearchpattern, TEST_MEMORY=$knownfailurememorypattern, TEST_CPUSPEED=$knownfailurecpuspeedpattern, TEST_TIMEZONE=$knownfailuretimezonepattern,";
open PATTERNS, "<$patterns" or die "Unable to open known failure patterns file $patterns: $!\n";
while (<PATTERNS>) {
chomp;
s/\s+$//;
($testid) = $_ =~ /^TEST_ID=([^,]*),/;
if (!$includedtests{$testid})
{
debug "test $testid was not included during this run";
}
- elsif ($_ =~ /^TEST_ID=[^,]*, TEST_BRANCH=$knownfailurebranchpattern, TEST_RESULT=[^,]*, TEST_BUILDTYPE=$knownfailurebuildtypepattern, TEST_TYPE=$knownfailuretesttypepattern, TEST_OS=$knownfailureospattern, TEST_MACHINE=[^,]*, TEST_PROCESSORTYPE=$knownfailurearchpattern, TEST_KERNEL=$knownfailurekernelpattern, TEST_DATE=[^,]*, TEST_TIMEZONE=$knownfailuretimezonepattern,/) {
+ elsif ($_ =~ /^TEST_ID=[^,]*, TEST_BRANCH=$knownfailurebranchpattern, TEST_BUILDTYPE=$knownfailurebuildtypepattern, TEST_TYPE=$knownfailuretesttypepattern, TEST_OS=$knownfailureospattern, TEST_KERNEL=$knownfailurekernelpattern, TEST_PROCESSORTYPE=$knownfailurearchpattern, TEST_MEMORY=$knownfailurememorypattern, TEST_CPUSPEED=$knownfailurecpuspeedpattern, TEST_TIMEZONE=$knownfailuretimezonepattern,/) {
debug "adding pattern : $_";
push @patterns, (escape_pattern($_));
}
else {
debug "skipping pattern: $_";
}
}
close PATTERNS;
# create a working copy of the current failures which match the users selection
-debug "failure filter: ^TEST_ID=[^,]*, TEST_BRANCH=$failurebranchpattern, TEST_RESULT=FAIL[^,]*, TEST_BUILDTYPE=$failurebuildtypepattern, TEST_TYPE=$failuretesttypepattern, TEST_OS=$failureospattern, TEST_MACHINE=[^,]*, TEST_PROCESSORTYPE=$failurearchpattern, TEST_KERNEL=$failurekernelpattern, TEST_DATE=[^,]*, TEST_TIMEZONE=$failuretimezonepattern,";
+debug "failure filter: ^TEST_ID=[^,]*, TEST_BRANCH=$failurebranchpattern, TEST_BUILDTYPE=$failurebuildtypepattern, TEST_TYPE=$failuretesttypepattern, TEST_OS=$failureospattern, TEST_KERNEL=$failurekernelpattern, TEST_PROCESSORTYPE=$failurearchpattern, TEST_MEMORY=$failurememorypattern, TEST_CPUSPEED=$failurecpuspeedpattern, TEST_TIMEZONE=$failuretimezonepattern, TEST_RESULT=FAIL[^,]*,/";
if (defined($rawlogfile)) {
$failurelogfile = "$outputprefix-results-failures.log";
my $alllog = "$outputprefix-results-all.log";
debug "writing failures $failurelogfile";
@@ -184,39 +190,53 @@ if (defined($rawlogfile)) {
open ALLLOG, ">$alllog" or die "Unable to open $alllog $!\n";
open FAILURELOG, ">$failurelogfile" or die "Unable to open $failurelogfile $!\n";
while (<INPUTLOG>) {
chomp;
print ALLLOG "$_\n";
- if ($_ =~ /^TEST_ID=[^,]*, TEST_BRANCH=$failurebranchpattern, TEST_RESULT=FAIL[^,]*, TEST_BUILDTYPE=$failurebuildtypepattern, TEST_TYPE=$failuretesttypepattern, TEST_OS=$failureospattern, TEST_MACHINE=[^,]*, TEST_PROCESSORTYPE=$failurearchpattern, TEST_KERNEL=$failurekernelpattern, TEST_DATE=[^,]*, TEST_TIMEZONE=$failuretimezonepattern,/) {
+ if ($_ =~ /^TEST_ID=[^,]*, TEST_BRANCH=$failurebranchpattern, TEST_BUILDTYPE=$failurebuildtypepattern, TEST_TYPE=$failuretesttypepattern, TEST_OS=$failureospattern, TEST_KERNEL=$failurekernelpattern, TEST_PROCESSORTYPE=$failurearchpattern, TEST_MEMORY=$failurememorypattern, TEST_CPUSPEED=$failurecpuspeedpattern, TEST_TIMEZONE=$failuretimezonepattern, TEST_RESULT=FAIL[^,]*,/) {
debug "failure: $_";
push @failures, ($_);
print FAILURELOG "$_\n";
}
}
close INPUTLOG;
my $inputrc = $?;
close ALLLOG;
close FAILURELOG;
die "FATAL ERROR in post-process-logs.pl" if $inputrc != 0;
-
}
-else {
-
+else
+{
debug "loading failures $failurelogfile";
- open FAILURES, "<$failurelogfile" or die "Unable to open current failure log $failurelogfile: $!\n";
+ my $failurelogfilemode;
+
+ if ($failurelogfile =~ /\.bz2$/)
+ {
+ $failurelogfilemode = "bzcat $failurelogfile|";
+ }
+ elsif ($failurelogfile =~ /\.gz$/)
+ {
+ $failurelogfilemode = "zcat $failurelogfile|";
+ }
+ else
+ {
+ $failurelogfilemode = "<$failurelogfile";
+ }
+
+ open FAILURES, "$failurelogfilemode" or die "Unable to open current failure log $failurelogfile: $!\n";
while (<FAILURES>) {
chomp;
- if ($_ =~ /^TEST_ID=[^,]*, TEST_BRANCH=$failurebranchpattern, TEST_RESULT=FAIL[^,]*, TEST_BUILDTYPE=$failurebuildtypepattern, TEST_TYPE=$failuretesttypepattern, TEST_OS=$failureospattern, TEST_MACHINE=[^,]*, TEST_PROCESSORTYPE=$failurearchpattern, TEST_KERNEL=$failurekernelpattern, TEST_DATE=[^,]*, TEST_TIMEZONE=$failuretimezonepattern,/) {
+ if ($_ =~ /^TEST_ID=[^,]*, TEST_BRANCH=$failurebranchpattern, TEST_BUILDTYPE=$failurebuildtypepattern, TEST_TYPE=$failuretesttypepattern, TEST_OS=$failureospattern, TEST_KERNEL=$failurekernelpattern, TEST_PROCESSORTYPE=$failurearchpattern, TEST_MEMORY=$failurememorypattern, TEST_CPUSPEED=$failurecpuspeedpattern, TEST_TIMEZONE=$failuretimezonepattern, TEST_RESULT=FAIL[^,]*,/) {
debug "failure: $_";
push @failures, ($_);
}
}
close FAILURES;
}
debug "finding fixed bugs";
@@ -338,35 +358,45 @@ sub debug {
sub usage {
my $msg = shift;
print STDERR <<EOF;
usage: $msg
-known-failures.pl [-b|--branch] branch [-T|--buildtype] buildtype
- [-t|--testtype] testtype [-o os|--os]
+known-failures.pl [-b|--branch] branch
+ [-T|--buildtype] buildtype
+ [-t|--testtype] testtype
+ [-o|--os] os
+ [-K|--kernel] kernel
+ [-A|--arch] arch
+ [-M|--memory] memory
+ [-S|--speed] speed
+ [-z|--timezone] timezone
+ [-r|--patterns] patterns
([-f|--failurelogfile] failurelogfile|[-l|--logfile] rawlogfile])
- [-r|--patterns] patterns [-z|--timezone] timezone
[-O|--outputprefix] outputprefix
+ [-D]
variable description
=============== ============================================================
-b branch branch 1.8.0, 1.8.1, 1.9.0, all
-T buildtype build type opt, debug, all
-t testtype test type browser, shell, all
+ -o os operating system nt, darwin, linux, all
+ -K kernel kernel, all or a specific pattern
+ -A arch architecture, all or a specific pattern
+ -M memory memory in Gigabytes, all or a specific pattern
+ -S speed speed, all or specific pattern
+ -z timezone -0400, -0700, etc. default to user\'s zone
-l rawlogfile raw logfile
-f failurelogfile failure logfile
- -o os operating system win32, mac, linux, all
-r patterns known failure patterns
- -z timezone -0400, -0700, etc. default to user\'s zone
-O outputprefix output files will be generated with this prefix
- -A arch architecture, all or a specific pattern
- -K kernel kernel, all or a specific pattern
-D turn on debugging output
EOF
exit(2);
}
sub parse_options {
my ($option, $value);
@@ -380,171 +410,216 @@ sub parse_options {
$branch = $value;
}
elsif ($option eq "T") {
$buildtype = $value;
}
elsif ($option eq "t") {
$testtype = $value;
}
- elsif ($option eq "l") {
- $rawlogfile = $value;
- }
- elsif ($option eq "f") {
- $failurelogfile = $value;
- }
elsif ($option eq "o") {
$os = $value;
}
- elsif ($option eq "r") {
- $patterns = $value;
+ elsif ($option eq "K") {
+ $kernel = $value;
+ }
+ elsif ($option eq "A") {
+ $arch = $value;
+ }
+ elsif ($option eq "M") {
+ $memory = $value;
+ }
+ elsif ($option eq "S") {
+ $cpuspeed = $value;
+ if ($cpuspeed < 4)
+ {
+ $cpuspeed = 'slow';
+ }
+ elsif ($cpuspeed < 9)
+ {
+ $cpuspeed = 'medium';
+ }
+ else
+ {
+ $cpuspeed = 'fast';
+ }
}
elsif ($option eq "z") {
$timezone = $value;
}
- elsif ($option eq "O") {
- $outputprefix = $value;
+ elsif ($option eq "r") {
+ $patterns = $value;
}
- elsif ($option eq "A") {
- $arch = $value;
+ elsif ($option eq "l") {
+ $rawlogfile = $value;
}
- elsif ($option eq "K") {
- $kernel = $value;
+ elsif ($option eq "f") {
+ $failurelogfile = $value;
+ }
+ elsif ($option eq "O") {
+ $outputprefix = $value;
}
elsif ($option eq "D") {
$debug = 1;
}
}
if ($debug) {
- print "branch=$branch, rawlogfile=$rawlogfile failurelogfile=$failurelogfile, os=$os, buildtype=$buildtype, testtype=$testtype, patterns=$patterns, timezone=$timezone, outputprefix=$outputprefix\n";
+ print "branch=$branch, buildtype=$buildtype, testtype=$testtype, os=$os, kernel=$kernel, arch=$arch, memory=$memory, cpuspeed=$cpuspeed, timezone=$timezone, patterns=$patterns, rawlogfile=$rawlogfile failurelogfile=$failurelogfile, outputprefix=$outputprefix\n";
}
Getopt::Mixed::cleanup();
if ( !defined($branch) ) {
usage "missing branch";
}
- if (!defined($rawlogfile) && !defined($failurelogfile)) {
- usage "missing logfile";
+ if (!defined($buildtype)) {
+ usage "missing buildtype";
}
+ if (!defined($testtype)) {
+ usage "missing testtype";
+ }
if (!defined($os)) {
usage "missing os";
}
- if (!defined($buildtype)) {
- usage "missing buildtype";
+ if (!defined($memory)) {
+ $memory = 'all';
}
- if (!defined($testtype)) {
- usage "missing testtype";
+ if (!defined($cpuspeed)) {
+ $cpuspeed = 'all';
+ }
+
+ if (!defined($timezone)) {
+ usage "missing timezone";
}
if (!defined($patterns)) {
usage "missing patterns";
}
-
- if (!defined($timezone)) {
- usage "missing timezone";
+ if (!defined($rawlogfile) && !defined($failurelogfile)) {
+ usage "missing logfile";
}
-
if (!defined($outputprefix)) {
usage "missing outputprefix";
}
if ($branch eq "1.8.0") {
- $knownfailurebranchpattern = "([^,]*1\\.8\\.0[^,]*|\\.\\*)";
+ $knownfailurebranchpattern = "(1\\.8\\.0|\\.\\*)";
$failurebranchpattern = "1\\.8\\.0";
}
- if ($branch eq "1.8.1") {
- $knownfailurebranchpattern = "([^,]*1\\.8\\.1[^,]*|\\.\\*)";
+ elsif ($branch eq "1.8.1") {
+ $knownfailurebranchpattern = "(1\\.8\\.1|\\.\\*)";
$failurebranchpattern = "1\\.8\\.1";
}
elsif ($branch eq "1.9.0") {
- $knownfailurebranchpattern = "([^,]*1\\.9\\.0[^,]*|\\.\\*)";
+ $knownfailurebranchpattern = "(1\\.9\\.0|\\.\\*)";
$failurebranchpattern = "1\\.9\\.0";
}
+ elsif ($branch eq "1.9.1") {
+ $knownfailurebranchpattern = "(1\\.9\\.1|\\.\\*)";
+ $failurebranchpattern = "1\\.9\\.1";
+ }
elsif ($branch eq "all") {
$knownfailurebranchpattern = "[^,]*";
$failurebranchpattern = "[^,]*";
}
- if ($os eq "win32") {
- $knownfailureospattern = "([^,]*win32[^,]*|\\.\\*)";
- $failureospattern = "win32";
- }
- elsif ($os eq "mac") {
- $knownfailureospattern = "([^,]*mac[^,]*|\\.\\*)";
- $failureospattern = "mac";
- }
- elsif ($os eq "linux") {
- $knownfailureospattern = "([^,]*linux[^,]*|\\.\\*)";
- $failureospattern = "linux";
- }
- elsif ($os eq "all") {
- $knownfailureospattern = "[^,]*";
- $failureospattern = "[^,]*";
- }
-
if ($buildtype eq "opt") {
- $knownfailurebuildtypepattern = "([^,]*opt[^,]*|\\.\\*)";
+ $knownfailurebuildtypepattern = "(opt|\\.\\*)";
$failurebuildtypepattern = "opt";
}
elsif ($buildtype eq "debug") {
- $knownfailurebuildtypepattern = "([^,]*debug[^,]*|\\.\\*)";
+ $knownfailurebuildtypepattern = "(debug|\\.\\*)";
$failurebuildtypepattern = "debug";
}
elsif ($buildtype eq "all") {
$knownfailurebuildtypepattern = "[^,]*";
$failurebuildtypepattern = "[^,]*";
}
if ($testtype eq "shell") {
- $knownfailuretesttypepattern = "([^,]*shell[^,]*|\\.\\*)";
+ $knownfailuretesttypepattern = "(shell|\\.\\*)";
$failuretesttypepattern = "shell";
}
elsif ($testtype eq "browser") {
- $knownfailuretesttypepattern = "([^,]*browser[^,]*|\\.\\*)";
+ $knownfailuretesttypepattern = "(browser|\\.\\*)";
$failuretesttypepattern = "browser";
}
elsif ($testtype eq "all") {
$knownfailuretesttypepattern = "[^,]*";
$failuretesttypepattern = "[^,]*";
}
- if ($timezone eq "all") {
- $knownfailuretimezonepattern = "[^,]*";
- $failuretimezonepattern = "[^,]*";
+ if ($os eq "nt") {
+ $knownfailureospattern = "(nt|\\.\\*)";
+ $failureospattern = "nt";
+ }
+ elsif ($os eq "darwin") {
+ $knownfailureospattern = "(darwin|\\.\\*)";
+ $failureospattern = "darwin";
+ }
+ elsif ($os eq "linux") {
+ $knownfailureospattern = "(linux|\\.\\*)";
+ $failureospattern = "linux";
+ }
+ elsif ($os eq "all") {
+ $knownfailureospattern = "[^,]*";
+ $failureospattern = "[^,]*";
+ }
+
+ if ($kernel ne "all") {
+ $knownfailurekernelpattern = "(" . $kernel . "|\\.\\*)";
+ $failurekernelpattern = "$kernel";
}
else {
- $knownfailuretimezonepattern = "([^,]*" . $timezone . "[^,]*|\\.\\*)";
- $failuretimezonepattern = "$timezone";
+ $knownfailurekernelpattern = "[^,]*";
+ $failurekernelpattern = "[^,]*";
}
if ($arch ne "all") {
- $knownfailurearchpattern = "([^,]*" . $arch . "[^,]*|\\.\\*)";
+ $knownfailurearchpattern = "(" . $arch . "|\\.\\*)";
$failurearchpattern = "$arch";
}
else {
$knownfailurearchpattern = "[^,]*";
$failurearchpattern = "[^,]*";
}
- if ($kernel ne "all") {
- $knownfailurekernelpattern = "([^,]*" . $kernel . "[^,]*|\\.\\*)";
- $failurekernelpattern = "$kernel";
+ if ($memory ne "all") {
+ $knownfailurememorypattern = "(" . $memory . "|\\.\\*)";
+ $failurememorypattern = "$memory";
}
else {
- $knownfailurekernelpattern = "[^,]*";
- $failurekernelpattern = "[^,]*";
+ $knownfailurememorypattern = "[^,]*";
+ $failurememorypattern = "[^,]*";
+ }
+
+ if ($cpuspeed ne "all") {
+ $knownfailurecpuspeedpattern = "(" . $cpuspeed . "|\\.\\*)";
+ $failurecpuspeedpattern = "$cpuspeed";
+ }
+ else {
+ $knownfailurecpuspeedpattern = "[^,]*";
+ $failurecpuspeedpattern = "[^,]*";
+ }
+
+ if ($timezone eq "all") {
+ $knownfailuretimezonepattern = "[^,]*";
+ $failuretimezonepattern = "[^,]*";
+ }
+ else {
+ $knownfailuretimezonepattern = "(" . $timezone . "|\\.\\*)";
+ $failuretimezonepattern = "$timezone";
}
}
sub escape_pattern {
my $line = shift;
Index: pattern-expander.pl
===================================================================
RCS file: pattern-expander.pl
diff -N pattern-expander.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pattern-expander.pl 25 Jun 2008 17:31:16 -0000
@@ -0,0 +1,159 @@
+#!/usr/bin/perl -w
+# -*- Mode: Perl; tab-width: 4; indent-tabs-mode: nil; -*-
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla JavaScript Testing Utilities
+#
+# The Initial Developer of the Original Code is
+# Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bob Clary <bclary@bclary.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# usage: pattern-expander.pl knownfailures > knownfailures.expanded
+#
+# pattern-expander.pl reads the specified knownfailures file and
+# writes to stdout an expanded set of failures where the wildcards
+# ".*" are replaced with the set of possible values specified in the
+# universe.data file.
+
+use lib "/work/mozilla/mozilla.com/test.mozilla.com/www/tests/mozilla.org/js";
+
+use Patterns;
+
+package Patterns;
+
+processfile();
+
+sub processfile
+{
+ my ($i, $j);
+
+ while (<ARGV>) {
+
+ chomp;
+
+ $record = {};
+
+ my ($test_id, $test_branch, $test_buildtype, $test_type, $test_os, $test_kernel, $test_processortype, $test_memory, $test_cpuspeed, $test_timezone, $test_result, $test_exitstatus, $test_description) = $_ =~
+ /TEST_ID=([^,]*), TEST_BRANCH=([^,]*), TEST_BUILDTYPE=([^,]*), TEST_TYPE=([^,]*), TEST_OS=([^,]*), TEST_KERNEL=([^,]*), TEST_PROCESSORTYPE=([^,]*), TEST_MEMORY=([^,]*), TEST_CPUSPEED=([^,]*), TEST_TIMEZONE=([^,]*), TEST_RESULT=([^,]*), TEST_EXITSTATUS=([^,]*), TEST_DESCRIPTION=(.*)/;
+
+ $record->{TEST_ID} = $test_id;
+ $record->{TEST_BRANCH} = $test_branch;
+ $record->{TEST_BUILDTYPE} = $test_buildtype;
+ $record->{TEST_TYPE} = $test_type;
+ $record->{TEST_OS} = $test_os;
+ $record->{TEST_KERNEL} = $test_kernel;
+ $record->{TEST_PROCESSORTYPE} = $test_processortype;
+ $record->{TEST_MEMORY} = $test_memory;
+ $record->{TEST_CPUSPEED} = $test_cpuspeed;
+ $record->{TEST_TIMEZONE} = $test_timezone;
+ $record->{TEST_RESULT} = $test_result;
+ $record->{TEST_EXITSTATUS} = $test_exitstatus;
+ $record->{TEST_DESCRIPTION} = $test_description;
+
+ dbg("processfile: \$_=$_");
+
+ my @list1 = ();
+ my @list2 = ();
+
+ my $iuniversefield;
+ my $universefield;
+
+ $item1 = copyreference($record);
+ dbg("processfile: check copyreference");
+ dbg("processfile: \$record=" . recordtostring($record));
+ dbg("processfile: \$item1=" . recordtostring($item1));
+
+ push @list1, ($item1);
+
+ for ($iuniversefield = 0; $iuniversefield < @universefields; $iuniversefield++)
+ {
+ $universefield = $universefields[$iuniversefield];
+
+ dbg("processfile: \$universefields[$iuniversefield]=$universefield, \$record->{$universefield}=$record->{$universefield}");
+
+ for ($j = 0; $j < @list1; $j++)
+ {
+ $item1 = $list1[$j];
+ dbg("processfile: item1 \$list1[$j]=" . recordtostring($item1));
+ # create a reference to a copy of the hash referenced by $item1
+ if ($item1->{$universefield} ne '.*')
+ {
+ dbg("processfile: literal value");
+ $item2 = copyreference($item1);
+ dbg("processfile: check copyreference");
+ dbg("processfile: \$item1=" . recordtostring($item1));
+ dbg("processfile: \$item2=" . recordtostring($item2));
+ dbg("processfile: pushing existing record to list 2: " . recordtostring($item2));
+ push @list2, ($item2);
+ }
+ else
+ {
+ dbg("processfile: wildcard value");
+ $keyfielduniversekey = getuniversekey($item1, $universefield);
+ @keyfielduniverse = getuniverse($keyfielduniversekey, $universefield);
+
+ dbg("processfile: \$keyfielduniversekey=$keyfielduniversekey, \@keyfielduniverse=" . join(',', @keyfielduniverse));
+
+ for ($i = 0; $i < @keyfielduniverse; $i++)
+ {
+ $item2 = copyreference($item1);
+ dbg("processfile: check copyreference");
+ dbg("processfile: \$item1=" . recordtostring($item1));
+ dbg("processfile: \$item2=" . recordtostring($item2));
+ $item2->{$universefield} = $keyfielduniverse[$i];
+ dbg("processfile: pushing new record to list 2 " . recordtostring($item2));
+ push @list2, ($item2);
+ }
+ }
+ for ($i = 0; $i < @list1; $i++)
+ {
+ dbg("processfile: \$list1[$i]=" . recordtostring($list1[$i]));
+ }
+ for ($i = 0; $i < @list2; $i++)
+ {
+ dbg("processfile: \$list2[$i]=" . recordtostring($list2[$i]));
+ }
+ }
+
+ @list1 = @list2;
+ @list2 = ();
+ }
+ for ($j = 0; $j < @list1; $j++)
+ {
+ $item1 = $list1[$j];
+ push @records, ($item1);
+ }
+ }
+ @records = sort sortrecords @records;
+
+ dumprecords();
+}
+
Index: pattern-extracter.pl
===================================================================
RCS file: pattern-extracter.pl
diff -N pattern-extracter.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pattern-extracter.pl 25 Jun 2008 17:31:16 -0000
@@ -0,0 +1,217 @@
+#!/usr/bin/perl -w
+# -*- Mode: Perl; tab-width: 4; indent-tabs-mode: nil; -*-
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla JavaScript Testing Utilities
+#
+# The Initial Developer of the Original Code is
+# Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bob Clary <bclary@bclary.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# usage: pattern-extracter.pl knownfailures.expanded > knownfailures
+#
+# pattern-extracter.pl reads the specified expanded knownfailures file
+# (see pattern-expander.pl) and writes to stdout a set of knownfailures
+# where repetitions of values found in the universe.data file are
+# replaced with wildcards ".*".
+
+use lib "/work/mozilla/mozilla.com/test.mozilla.com/www/tests/mozilla.org/js";
+
+use Patterns;
+
+package Patterns;
+
+
+my $universefield;
+
+processfile();
+
+sub processfile
+{
+ my $recordcurr = {};
+ my $recordprev;
+
+ my @output;
+ my $keycurr = '';
+ my $keyprev = '';
+ my @values = ();
+ my $universefielduniversekey; # universekey for universefield
+ my @universefielduniverse;
+ my $i;
+ my $j;
+ my $v;
+
+ while (<ARGV>) {
+
+ chomp;
+
+ $recordcurr = {};
+
+ my ($test_id, $test_branch, $test_buildtype, $test_type, $test_os, $test_kernel, $test_processortype, $test_memory, $test_cpuspeed, $test_timezone, $test_result, $test_exitstatus, $test_description) = $_ =~
+ /TEST_ID=([^,]*), TEST_BRANCH=([^,]*), TEST_BUILDTYPE=([^,]*), TEST_TYPE=([^,]*), TEST_OS=([^,]*), TEST_KERNEL=([^,]*), TEST_PROCESSORTYPE=([^,]*), TEST_MEMORY=([^,]*), TEST_CPUSPEED=([^,]*), TEST_TIMEZONE=([^,]*), TEST_RESULT=([^,]*), TEST_EXITSTATUS=([^,]*), TEST_DESCRIPTION=(.*)/;
+
+ $recordcurr->{TEST_ID} = $test_id;
+ $recordcurr->{TEST_BRANCH} = $test_branch;
+ $recordcurr->{TEST_BUILDTYPE} = $test_buildtype;
+ $recordcurr->{TEST_TYPE} = $test_type;
+ $recordcurr->{TEST_OS} = $test_os;
+ $recordcurr->{TEST_KERNEL} = $test_kernel;
+ $recordcurr->{TEST_PROCESSORTYPE} = $test_processortype;
+ $recordcurr->{TEST_MEMORY} = $test_memory;
+ $recordcurr->{TEST_CPUSPEED} = $test_cpuspeed;
+ $recordcurr->{TEST_TIMEZONE} = $test_timezone;
+ $recordcurr->{TEST_RESULT} = $test_result;
+ $recordcurr->{TEST_EXITSTATUS} = $test_exitstatus;
+ $recordcurr->{TEST_DESCRIPTION} = $test_description;
+
+ push @records, ($recordcurr);
+ }
+
+ for ($j = $#universefields; $j >= 0; $j--)
+ {
+ $universefield = $universefields[$j];
+
+ @records = sort {getkey($a, $universefield) cmp getkey($b, $universefield);} @records;
+
+ $recordprev = $records[0];
+ $keyprev = getkey($recordprev, $universefield);
+ @values = ();
+
+ my $recordtemp;
+ my $keytemp;
+
+ dbg("processfile: begin processing records for \$universefields[$j]=$universefield");
+
+ for ($i = 0; $i < @records; $i++)
+ {
+ $recordcurr = $records[$i];
+ $keycurr = getkey($recordcurr, $universefield);
+
+ dbg("processfile: processing record[$i]");
+ dbg("processfile: recordprev: " . recordtostring($recordprev));
+ dbg("processfile: recordcurr: " . recordtostring($recordcurr));
+ dbg("processfile: \$keyprev=$keyprev");
+ dbg("processfile: \$keycurr=$keycurr");
+
+ if ($keycurr ne $keyprev)
+ {
+ # key changed, must output previous record
+ dbg("processfile: new key");
+ $universefielduniversekey = getuniversekey($recordprev, $universefield);
+ @universefielduniverse = getuniverse($universefielduniversekey, $universefield);
+ dbg("processfile: \@values: ". join(',', @values));
+ dbg("processfile: \$universefielduniversekey=$universefielduniversekey, \@universefielduniverse=" . join(',', @universefielduniverse));
+ @values = ('.*') if (arraysequal(\@values, \@universefielduniverse));
+ dbg("processfile: \@values=" . join(',', @values));
+
+ for ($v = 0; $v < @values; $v++)
+ {
+ dbg("processfile: stuffing $values[$v]");
+ $recordtemp = copyreference($recordprev);
+ $recordtemp->{$universefield} = $values[$v];
+ dbg("processfile: stuffed $recordtemp->{$universefield}");
+ dbg("processfile: recordprev: " . recordtostring($recordprev));
+ dbg("processfile: output: " . recordtostring($recordtemp));
+ push @output, ($recordtemp);
+ }
+ @values = ();
+ }
+ dbg("processfile: collecting \$recordcurr->{$universefield}=$recordcurr->{$universefield}");
+ push @values, ($recordcurr->{$universefield});
+ $keyprev = $keycurr;
+ $recordprev = $recordcurr;
+ }
+ dbg("processfile: finish processing records for \$universefields[$j]=$universefield");
+ if (@values)
+ {
+ dbg("processfile: last record for \$universefields[$j]=$universefield has pending values");
+ $universefielduniversekey = getuniversekey($recordprev, $universefield);
+ @universefielduniverse = getuniverse($universefielduniversekey, $universefield);
+ dbg("processfile: \@values: ". join(',', @values));
+ dbg("processfile: \$universefielduniversekey=$universefielduniversekey, \@universefielduniverse=" . join(',', @universefielduniverse));
+ @values = ('.*') if (arraysequal(\@values, \@universefielduniverse));
+ dbg("processfile: \@values=" . join(',', @values));
+
+ for ($v = 0; $v < @values; $v++)
+ {
+ dbg("processfile: stuffing $values[$v]");
+ $recordtemp = copyreference($recordprev);
+ $recordtemp->{$universefield} = $values[$v];
+ dbg("processfile: stuffed $recordprev->{$universefield}");
+ dbg("processfile: recordprev: " . recordtostring($recordprev));
+ dbg("processfile: output: " . recordtostring($recordtemp));
+ push @output, ($recordtemp);
+ }
+ @values = ();
+ }
+ @records = @output;
+ @output = ();
+ }
+
+ @records = sort sortrecords @records;
+ dumprecords();
+}
+
+
+sub getkey
+{
+ my ($record, $universefield) = @_;
+
+ my $i;
+
+ my $key = '';
+
+ for ($i = 0; $i < @sortkeyfields; $i++)
+ {
+ if ($sortkeyfields[$i] ne $universefield)
+ {
+ $key .= $record->{$sortkeyfields[$i]}
+ }
+ }
+ return $key;
+}
+
+sub arraysequal
+{
+ my ($larrayref, $rarrayref) = @_;
+ my $i;
+
+ dbg("arraysequal: checking if " . (join ',', @{$larrayref}) . " is equal to " . (join ',', @{$rarrayref}));
+ return 0 if (@{$larrayref} != @{$rarrayref});
+
+ for ($i = 0; $i < @{$larrayref}; $i++)
+ {
+ return 0 if ($rarrayref->[$i] ne $larrayref->[$i]);
+ }
+ dbg("arraysequal: equal");
+ return 1;
+}
+
Index: post-process-logs.pl
===================================================================
RCS file: /cvsroot/mozilla/js/tests/post-process-logs.pl,v
retrieving revision 1.10
diff -p -U 8 -r1.10 post-process-logs.pl
--- post-process-logs.pl 3 Apr 2008 16:25:01 -0000 1.10
+++ post-process-logs.pl 25 Jun 2008 17:31:16 -0000
@@ -57,33 +57,36 @@ $ENV{LC_ALL} = 'C';
(undef, $temp) = tempfile();
open TEMP, ">$temp" or
die "FATAL ERROR: Unable to open temporary file $temp for writing: $!\n";
local ($test_id,
$tmp_test_id,
+ $tmp_test_exit_status,
%test_id,
%test_reported,
$test_result,
$test_type,
$tmp_test_type,
$test_description,
@messages,
$test_processortype,
$test_kernel,
$test_suite,
- $exit_status,
- $page_status,
+ $test_exit_status,
+ @expected_exit_code_list,
+ $expected_exit_code,
+ $exit_code,
$state);
-local ($actual_exit, $actual_signal);
-
-local %test_reported = ();
+local $test_memory = 0;
+local $test_cpuspeed = 0;
+local %test_reported = ();
while ($file = shift @ARGV)
{
@messages = ();
dbg "file: $file";
my $filename = basename $file;
@@ -95,776 +98,491 @@ while ($file = shift @ARGV)
$test_machine,$test_global_target) = split /,/, $filename;
$test_branchid =~ s/[^0-9.]//g;
$test_global_target =~ s/.log$//;
local ($test_timezone) = $test_date;
$test_timezone =~ s/.*([-+]\d{4,4})/$1/;
- open FILE, "$file" or die "FATAL ERROR: unable to open $file for reading: $!\n";
+ my $filemode;
+
+ if ($file =~ /\.bz2$/)
+ {
+ $filemode = "bzcat $file|";
+ }
+ elsif ($file =~ /\.gz$/)
+ {
+ $filemode = "zcat $file|";
+ }
+ else
+ {
+ $filemode = "<$file";
+ }
+
+ open FILE, "$filemode" or die "FATAL ERROR: unable to open $file for reading: $!\n";
dbg "process header with environment variables used in test";
while (<FILE>)
{
$state = 'failure';
chomp;
# remove carriage returns, bels and other annoyances.
$_ =~ s/[\r]$//;
$_ =~ s/[\r]/CR/g;
$_ =~ s/[\x01-\x08]//g;
$_ =~ s/\s+$//;
- dbg "INPUT: $_";
+ if ($debug)
+ {
+ dbg "\nINPUT: $_";
+ }
- last if ( $_ =~ /^environment: EOF/);
+ last if ( $_ =~ /^arguments:/);
if (($envvar, $envval) = $_ =~ /^environment: (TEST_[A-Z0-9_]*)=(.*)/ )
{
dbg "envvar=$envvar, envval=$envval";
+ if ($envvar =~ /TEST_KERNEL/)
+ {
+ $envval =~ s/([0-9]+)\.([0-9]+)\.([0-9]+).*/$1.$2.$3/;
+ dbg "found TEST_KERNEL";
+ }
$envvar =~ tr/A-Z/a-z/;
$$envvar = $envval;
dbg $envvar . "=" . $$envvar;
}
elsif (($envval) = $_ =~ /^environment: OSID=(.*)/ )
{
$test_os = $envval;
}
}
+ if ($test_cpuspeed < 4)
+ {
+ $test_cpuspeed = 'slow';
+ }
+ elsif ($test_cpuspeed < 9)
+ {
+ $test_cpuspeed = 'medium';
+ }
+ else
+ {
+ $test_cpuspeed = 'fast';
+ }
+
if ($test_product eq "js")
{
- while (<FILE>)
- {
- chomp;
+ $test_type = "shell";
+ }
+ elsif ($test_product eq "firefox" || $test_product eq "thunderbird")
+ {
+ $test_buildtype = "nightly" unless $test_buildtype;
+ $test_type = "browser";
+ }
- dbg "INPUT: $_";
+# Expected sequence if all output written to the log.
+#
+# Input
+# -----------------------------
+# JavaScriptTest: Begin Run
+# JavaScriptTest: Begin Test t;
+# jstest: t
+# t:.*EXIT STATUS:
+# JavaScriptTest: End Test t
+# JavaScriptTest: End Run
+# EOF
+#
+ %test_id = ();
+ @messages = ();
+ $test_exit_status = '';
+ $state = 'idle';
- if (/Wrote results to/)
- {
- $state = 'success';
- last;
- }
+ while (<FILE>)
+ {
+ chomp;
- $_ =~ s/[\r]$//;
- $_ =~ s/[\r]/CR/g;
- $_ =~ s/[\x01-\x08]//g;
- $_ =~ s/\s+$//;
+ if ($debug)
+ {
+ dbg "\nINPUT: '$_'";
+ }
- next if ( $_ !~ /^jstest: /);
+ $_ =~ s/[\r]$//;
+ $_ =~ s/[\r]/CR/g;
+ $_ =~ s/[\x01-\x08]//g;
+ $_ =~ s/\s+$//;
- ($test_id) = $_ =~ /^jstest: (.*?) *bug:/;
- ($test_result) = $_ =~ /result: (.*?) *type:/;
- ($test_type) = $_ =~ /type: (.*?) *description:/;
- ($test_description) = $_ =~ /description: (.*)/;
+ if ( /^JavaScriptTest: Begin Run/)
+ {
+ dbg "Begin Run";
- if (!$test_description)
+ if ($state eq 'idle')
{
- $test_description = "";
+ $state = 'beginrun';
}
else
{
- ($actual_exit, $actual_signal) = $test_description =~ /expected: Expected exit [03] actual: Actual exit ([0-9]*), signal ([0-9]*)/;
- if (defined($actual_exit) or defined($actual_signal))
- {
- if ($actual_exit > 3 || $actual_signal > 0)
- {
- $test_description =~ s/ *expected: Expected exit [03] actual: Actual exit ([0-9]*), signal ([0-9]*) /EXIT STATUS: CRASHED $actual_exit signal $actual_signal, /;
- }
- }
- elsif ($test_result eq "FAILED TIMED OUT")
- {
- $test_description = "EXIT STATUS: TIMED OUT, $test_description";
- $test_result = "FAILED";
- }
+ warn "WARNING: state: $state, expected: idle, log: $file";
+ $state = 'beginrun';
}
+ }
+ elsif ( ($tmp_test_id) = $_ =~ /^JavaScriptTest: Begin Test ([^ ]*)/)
+ {
+ dbg "Begin Test: $tmp_test_id";
- if ($test_description =~ /error: can.t allocate region/ || /set a breakpoint in malloc_error_break/ ||
- /set a breakpoint in szone_error to debug/ || /malloc:.*mmap/ || /vm_allocate/ )
+ if ($state eq 'beginrun' || $state eq 'endtest')
{
- dbg "Adding message: /$test_id:0: out of memory";
- $test_description .= "; /$test_id:0: out of memory";
+ $state = 'runningtest';
+ }
+ else
+ {
+ warn "WARNING: state: $state, expected: beginrun, endtest, log: $file";
+ $state = 'runningtest';
}
- dbg "test_id: $test_id";
- dbg "test_result: $test_result";
- dbg "test_type: $test_type";
- dbg "test_description: $test_description";
-
- outputrecord $test_id, $test_description, $test_result;
+ $test_id{$state} = $tmp_test_id;
+ @messages = ();
+ @expected_exit_code_list = ();
+ $expected_exit_code = ();
+
+ $test_id = '';
+ $test_result = '';
+ $test_exit_status = 'NORMAL'; # default to normal, so subtests will have a NORMAL status
+ $test_description = '';
- dbg "-";
+ push @expected_exit_code_list, (3) if ($tmp_test_id =~ /-n.js$/);
+
}
- }
- elsif ($test_product eq "firefox")
- {
- %test_id = ();
- @messages = ();
-
- $page_status = '';
- $exit_status = '';
- $test_buildtype = "nightly" unless $test_buildtype;
- $test_type = "browser";
+ elsif ( ($expected_exit_code) = $_ =~ /WE EXPECT EXIT CODE ([0-9]*)/ )
+ {
+ dbg "Expected Exit Code: $expected_exit_code";
+ push @expected_exit_code_list, ($expected_exit_code);
+ }
+ elsif ( ($tmp_test_id) = $_ =~ /^jstest: (.*?) *bug:/)
+ {
+ dbg "jstest: $tmp_test_id";
-# non-restart mode. start spider; for each test { load test;} exit spider;
-# restart mode. for each test; { start spider; load test; exit spider; }
-#
-# Expected sequence if all output written to the log.
-#
-# Input Initial State Next State userhook event outputrecord
-# ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
-# Spider: Start.*start-spider.html idle startrun
-# Spider: Begin loading.*start-spider.html startrun startrun
-# Start Spider: try.*EXIT STATUS: NORMAL startrun initialized
-# Start Spider: try.*EXIT STATUS: (TIMED OUT|CRASHED) startrun startrun
-# Spider: Start.*urllist initialized initialized (non restart mode)
-# Spider: Begin loading.*urllist initialized initialized (non restart mode)
-# Spider: Finish loading.*urllist initialized initialized (non restart mode)
-# Spider: Current Url:.*urllist initialized initialized (non restart mode)
-# Spider: Start.*test=t; initialized starttest (has test id)
-# JavaScriptTest: Begin Run starttest starttest onStart
-# Spider: Begin loading.*test=t; starttest loadingtest (has test id)
-# JavaScriptTest: Begin Test t; loadingtest runningtest onBeforePage (has test id)
-# jstest: t runningtest reportingtest (has test id) yes.
-# Spider: Finish loading.*t=t; reportingtest loadedtest (has test id)
-# Spider: Finish loading.*t=t; runningtest pendingtest (has test id)
-# Spider: Current Url:.*test=t; loadedtest loadedtest (has test id)
-# http://.*test=t;.*PAGE STATUS: NORMAL loadedtest loadedtest onAfterPage (has test id)
-# http://.*test=t;.*PAGE STATUS: TIMED OUT loadedtest endrun onPageTimeout (has test id) yes.
-# JavaScriptTest: t Elapsed time loadedtest completedtest checkTestCompleted (has test id)
-# JavaScriptTest: End Test t completedtest completedtest checkTestCompleted (has test id)
-# JavaScriptTest: End Test t endrun endrun onPageTimeout (has test id)
-# Spider: Start.*test=t; completedtest starttest (non restart mode) (has test id)
-# JavaScriptTest: End Run completedtest endrun onStop
-# JavaScriptTest: End Run loadedtest endrun onStop
-# Spider: Start.*test=t; endrun starttest (restart mode) (has test id)
-# http://.*test=t;.*EXIT STATUS: NORMAL endrun endrun (has test id) maybe.
-# http://.*test=t;.*EXIT STATUS: TIMED OUT endrun endrun (has test id) yes.
-# http://.*test=t;.*EXIT STATUS: CRASHED endrun endrun (has test id) yes.
-# /work/mozilla/mozilla.com/test.mozilla.com/www$ endrun success
-# EOF success success
-# EOF endrun failure
-#
-# States has test id
-# -------------------------
-# idle
-# startrun
-# initialized
-# starttest has test id
-# loadingtest has test id
-# runningtest has test id
-# pendingtest has test id
-# reportingtest has test id
-# loadedtest has test id
-# endrun has test id
-# completedtest has test id
-# success
-# failure
+# if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
+# {
+# warn "WARNING: state: $state, expected runningtest, reportingtest. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
+# }
- dbg "Assuming starting in restart mode";
+ if ($state eq 'runningtest')
+ {
+ $state = 'reportingtest';
+ }
+ elsif ($state eq 'reportingtest')
+ {
+ $state = 'reportingtest';
+ }
+ else
+ {
+ warn "WARNING: test_id: $test_id{$state}, state: $state, expected: runningtest, reportingtest, log: $file";
+ $state = 'reportingtest';
+ }
- $mode = 'restart';
- $state = 'idle';
+ ($test_result) = $_ =~ /result: (.*?) *type:/;
+ ($tmp_test_type) = $_ =~ /type: (.*?) *description:/;
- while (<FILE>)
- {
- chomp;
+ die "FATAL ERROR: test_id: $test_id{$state}, jstest test type mismatch: start test_type: $test_type, current test_type: $tmp_test_type, test state: $state, log: $file"
+ if ($test_type ne $tmp_test_type);
- # remove carriage returns, bels and other annoyances.
- $_ =~ s/[\r]$//;
- $_ =~ s/[\r]/CR/g;
- $_ =~ s/[\x01-\x08]//g;
- $_ =~ s/\s+$//;
+ ($test_description) = $_ =~ /description: (.*)/;
- if ($debug)
+ if (!$test_description)
{
- dbg "\nINPUT: $_";
+ $test_description = "";
}
+ $test_description .= '; messages: ' . (join '; ', @messages) . ';';
- # massage the input to make more uniform across test types and platforms
- s/\.js, line ([0-9]*): out of memory/.js:$1: out of memory/g;
+ outputrecord $tmp_test_id, $test_description, $test_result;
+ $test_id{$state} = $tmp_test_id;
+ }
+ elsif ( $state ne 'idle' && (($tmp_test_id) = $_ =~ /^([^:]*):.* EXIT STATUS: NORMAL/))
+ {
+ $test_exit_status = 'NORMAL';
+ dbg "Exit Status Normal: $tmp_test_id, $test_exit_status";
- if (/^Spider: Start.*start-spider.html/)
+ if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
{
- if ($state eq 'idle')
- {
- $state = 'startrun';
- }
- else
- {
- warn "WARNING: state: $state, expected: idle, log: $file";
- $state = 'startrun';
- }
+ warn "WARNING: state: $state, mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
}
- elsif (/^Spider: Begin loading.*start-spider.html/)
+
+ if ($state eq 'reportingtest' || $state eq 'runningtest')
{
- if ($state eq 'startrun')
- {
- $state = 'startrun';
- }
- else
- {
- warn "WARNING: state: $state, expected: startrun, log: $file";
- $state = 'startrun';
- }
+ $state = 'exitedtest';
}
- elsif (/^Start Spider: try.*EXIT STATUS: NORMAL/)
+ else
{
- if ($state eq 'startrun')
- {
- $state = 'initialized';
- }
- else
- {
- warn "WARNING: state: $state, expected: startrun, log: $file";
- $state = 'initialized';
- }
+ warn "WARNING: state: $state, expected: reportingtest, runningtest, log: $file";
+ $state = 'exitedtest';
}
- elsif (/^Start Spider: try.*EXIT STATUS: (TIMED OUT|CRASHED)/)
+
+ if (! $test_reported{$tmp_test_id})
{
- if ($state eq 'startrun')
- {
- $state = 'startrun';
- }
- else
- {
- warn "WARNING: state: $state, expected: startrun, log: $file";
- $state = 'startrun';
- }
+ dbg "No test results reported: $tmp_test_id";
+
+ $test_result = 'FAILED';
+ $test_description = 'No test results reported; messages: ' . (join '; ', @messages) . ';';
+
+ outputrecord $tmp_test_id, $test_description, $test_result;
}
- elsif ( /^Spider: Start: -url .*test.mozilla.com.tests.mozilla.org.js.urllist-/)
- {
- dbg "Setting mode to nonrestart";
- $mode = 'nonrestart';
+ $test_id{$state} = $tmp_test_id;
+ }
+ elsif ( $state ne 'idle' && (($tmp_test_id) = $_ =~ /^([^:]*):.* EXIT STATUS: TIMED OUT/))
+ {
+ $test_exit_status = 'TIMED OUT';
+ dbg "Exit Status Timed Out: $tmp_test_id, $test_exit_status";
- if ($state eq 'initialized')
- {
- $state = 'initialized';
- }
- elsif ($state eq 'starttest')
- {
- $state = 'initialized';
- }
- else
- {
- warn "WARNING: state: $state, expected: initialized, starttest, log: $file";
- $state = 'initialized';
- }
- }
- elsif ( ($tmp_test_id) = $_ =~ /^Spider: Start.*http.*test=([^;]*);/)
+ if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
{
- if ($state eq 'initialized')
- {
- $state = 'starttest';
- }
- elsif ($state eq 'completedtest')
- {
- $state = 'starttest';
- }
- elsif ($state eq 'endrun')
- {
- $state = 'starttest';
- }
- else
- {
- warn "WARNING: state: $state, expected: initialized, completedtest, endrun, log: $file";
- $state = 'starttest';
- }
-
- $test_id{$state} = $tmp_test_id;
- $test_id{'loadingtest'} = $test_id{'runningtest'} = $test_id{'reportingtest'} = $test_id{'loadedtest'} = $test_id{'endrun'} = $test_id {'completedtest'} = $test_id{'loadedtest'} = '';
- @messages = ();
+ warn "WARNING: state: $state, mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
}
- elsif ( /^JavaScriptTest: Begin Run/)
+
+ if ($state eq 'reportingtest' || $state eq 'runningtest')
{
- if ($state eq 'starttest')
- {
- $state = 'starttest';
- }
- elsif ($state eq 'initialized' && $mode eq 'nonrestart')
- {
- $state = 'starttest';
- }
- else
- {
- warn "WARNING: state: $state, expected: starttest or initialized in non restart mode, mode $mode, log: $file";
- $state = 'starttest';
- }
+ $state = 'exitedtest';
}
- elsif ( ($tmp_test_id) = $_ =~ /^Spider: Begin loading http.*test=([^;]*);/)
+ else
{
- if ($mode eq 'restart' && $test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected starttest. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
+ dbg "state: $state, expected: reportingtest, runningtest";
+ $state = 'exitedtest';
+ }
- if ($state eq 'starttest')
- {
- $state = 'loadingtest';
- }
- elsif ($state eq 'initialized' && $mode eq 'nonrestart')
- {
- $state = 'loadingtest';
- }
- else
- {
- warn "WARNING: state: $state, expected: starttest or initialized in non restart mode, log: $file";
- $state = 'loadingtest';
- }
+ $test_result = 'FAILED';
+ $test_description .= '; messages: ' . (join '; ', @messages) . ';';
+
+ outputrecord $tmp_test_id, $test_description, $test_result;
- $test_id{$state} = $tmp_test_id;
- }
- elsif ( ($tmp_test_id) = $_ =~ /^JavaScriptTest: Begin Test ([^ ]*)/)
- {
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected loadingtest. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
+ $test_id{$state} = $tmp_test_id;
+ }
+ elsif ( $state ne 'idle' && (($tmp_test_id, $tmp_test_exit_status) = $_ =~ /^([^:]*):.* EXIT STATUS: (CRASHED signal [0-9]+ [A-Z]+) \([0-9.]+ seconds\)/))
+ {
+ $test_exit_status = $tmp_test_exit_status;
+ dbg "Exit Status Crashed: $tmp_test_id, $test_exit_status";
- if ($state eq 'loadingtest')
- {
- $state = 'runningtest';
- }
- else
- {
- warn "WARNING: state: $state, expected: loadingtest, log: $file";
- $state = 'runningtest';
- }
+ if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
+ {
+ warn "WARNING: state: $state, mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
+ }
- $test_id{$state} = $tmp_test_id;
+ if ($state eq 'reportingtest' || $state eq 'runningtest')
+ {
+ $state = 'exitedtest';
}
- elsif ( ($tmp_test_id) = $_ =~ /^jstest: (.*?) *bug:/)
+ else
{
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected runningtest, reportingtest. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
-
- if ($state eq 'runningtest')
- {
- $state = 'reportingtest';
- }
- elsif ($state eq 'reportingtest')
- {
- $state = 'reportingtest';
- }
- elsif ($state eq 'pendingtest')
- {
- $state = 'reportingtest';
- }
- else
- {
- warn "WARNING: test_id: $test_id{$state}, state: $state, expected: runningtest, reportingtest, pendingtest, log: $file";
- $state = 'reportingtest';
- }
-
- ($test_result) = $_ =~ /result: (.*?) *type:/;
- ($tmp_test_type) = $_ =~ /type: (.*?) *description:/;
-
- die "FATAL ERROR: test_id: $test_id{$state}, jstest test type mismatch: start test_type: $test_type, current test_type: $tmp_test_type, test state: $state, log: $file"
- if ($test_type ne $tmp_test_type);
-
- ($test_description) = $_ =~ /description: (.*)/;
+ dbg "state: $state, expected: reportingtest, runningtest";
+ $state = 'exitedtest';
+ }
- if (!$test_description)
- {
- $test_description = "";
- }
- $test_description .= ' ' . join '; ', @messages;
+ $test_result = 'FAILED';
+ $test_description .= '; messages: ' . (join '; ', @messages) . ';';
+
+ outputrecord $tmp_test_id, $test_description, $test_result;
- outputrecord $tmp_test_id, $test_description, $test_result;
+ $test_id{$state} = $tmp_test_id;
+ }
+ elsif ( $state ne 'idle' && (($tmp_test_id, $tmp_test_exit_status) = $_ =~ /^([^:]*):.* EXIT STATUS: (ABNORMAL [0-9]+) \([0-9.]+ seconds\)/))
+ {
+ $test_exit_status = $tmp_test_exit_status;
+ dbg "Exit Status Abnormal: $tmp_test_id, $test_exit_status";
- $test_id{$state} = $tmp_test_id;
- }
- elsif ( ($tmp_test_id) = $_ =~ /^Spider: Finish loading http.*test=([^;]*);/)
+ if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
{
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected reportingtest. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
-
- if ($state eq 'reportingtest')
- {
- $state = 'loadedtest';
- }
- else
- {
- # probably an out of memory error or a browser only delayed execution test.
- dbg "state: $state, expected: reportingtest. assuming test result is pending";
- $state = 'pendingtest';
- }
-
- $test_id{$state} = $tmp_test_id;
+ warn "WARNING: state: $state, mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
}
- elsif ( ($tmp_test_id) = $_ =~ /^Spider: Current Url:.*test=([^;]*);/)
- {
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected loadedtest. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
-
- if ($state eq 'loadedtest')
- {
- $state = 'loadedtest';
- }
- elsif ($state eq 'reportingtest')
- {
- $state = 'loadedtest';
- }
- elsif ($state eq 'pendingtest')
- {
- $state = 'pendingtest';
- }
- else
- {
- warn "WARNING: state: $state, expected: loadedtest, reportingtest, pendingtest, log: $file";
- $state = 'loadedtest';
- }
- $test_id{$state} = $tmp_test_id;
- }
- elsif ( ($tmp_test_id, $page_status) = $_ =~ /^http:.*test=([^;]*);.* (PAGE STATUS: NORMAL.*)/)
+ if ($state eq 'reportingtest' || $state eq 'runningtest')
{
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected loadedtest. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
-
- if ($state eq 'loadedtest')
- {
- $state = 'loadedtest';
- }
- elsif ($state eq 'pendingtest')
- {
- $state = 'pendingtest';
- }
- elsif ($state eq 'reportingtest')
- {
- # test was pending, but output a result.
- $state = 'loadedtest';
- }
- else
- {
- warn "WARNING: state: $state, expected: loadedtest, pendingtest, reportingtest, log: $file";
- $state = 'loadedtest';
- }
-
- $test_id{$state} = $tmp_test_id;
+ $state = 'exitedtest';
}
- elsif ( ($tmp_test_id, $page_status) = $_ =~ /^http:.*test=([^;]*);.* (PAGE STATUS: TIMED OUT.*)/)
+ else
{
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected loadedtest. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
-
- if ($state eq 'loadedtest')
- {
- $state = 'endrun';
- }
- elsif ($state eq 'runningtest')
- {
- $state = 'completedtest';
- }
- elsif ($state eq 'reportingtest')
- {
- $state = 'completedtest';
- }
- elsif ($state eq 'pendingtest')
- {
- $state = 'completedtest';
- }
- else
- {
- warn "WARNING: state: $state, expected: loadedtest, runningtest, reportingtest, pendingtest, log: $file";
- $state = 'endrun';
- }
+ dbg "state: $state, expected: reportingtest, runningtest";
+ $state = 'exitedtest';
+ }
- $test_result = 'FAILED';
- $test_description = $page_status . ' ' . join '; ', @messages;;
-
- outputrecord $tmp_test_id, $test_description, $test_result;
+ ($exit_code) = $test_exit_status =~ /ABNORMAL ([0-9]+)/;
- $test_id{$state} = $tmp_test_id;
+ if (grep /$exit_code/, @expected_exit_code_list)
+ {
+ $test_result = 'PASSED';
}
- elsif ( ($tmp_test_id) = $_ =~ /^JavaScriptTest: ([^ ]*) Elapsed time/)
+ else
{
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected loadedtest. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
+ $test_result = 'FAILED';
+ }
- if ($state eq 'loadedtest')
- {
- $state = 'completedtest';
- }
- elsif ($state eq 'pendingtest')
- {
- $state = 'pendingtest';
- }
- elsif ($state eq 'reportingtest')
- {
- # test was pending, but has been reported.
- $state = 'completedtest';
- }
- else
- {
- warn "WARNING: state: $state, expected: loadedtest, loadedtest, pendingtest, reportingtest, log: $file";
- $state = 'completedtest';
- }
+ $test_description .= '; messages: ' . (join '; ', @messages) . ';';
- $test_id{$state} = $tmp_test_id;
- }
- elsif ( ($tmp_test_id) = $_ =~ /^JavaScriptTest: End Test ([^ ]*)/)
- {
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected completedtest, endrun. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
+ dbg "Exit Code: $exit_code, Test Result: $test_result, Expected Exit Codes: " . (join '; ', @expected_exit_code_list);
- if ($state eq 'completedtest')
- {
- if ($mode eq 'restart')
- {
- $state = 'completedtest';
- }
- else
- {
- $state = 'starttest';
- }
- }
- elsif ($state eq 'pendingtest')
- {
- $state = 'completedtest';
+ outputrecord $tmp_test_id, $test_description, $test_result;
- $test_result = 'UNKNOWN';
- $test_description = 'No test results reported. ' . join '; ', @messages;
-
- outputrecord $tmp_test_id, $test_description, $test_result;
- }
- elsif ($state eq 'endrun')
- {
- $state = 'endrun';
- }
- else
- {
- warn "WARNING: state: $state, expected: completedtest, pendingtest, endrun, log: $file";
- $state = 'completedtest';
- }
+ $test_id{$state} = $tmp_test_id;
+ }
+ elsif ( ($tmp_test_id) = $_ =~ /^JavaScriptTest: End Test ([^ ]*)/)
+ {
+ dbg "End Test: $tmp_test_id";
- $test_id{$state} = $tmp_test_id;
+ if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
+ {
+ warn "WARNING: state: $state, mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
}
- elsif ( /^JavaScriptTest: End Run/)
+
+ if ($state eq 'exitedtest' || $state eq 'runningtest' || $state eq 'reportingtest')
{
- if ($state eq 'completedtest')
- {
- $state = 'endrun';
- }
- elsif ($state eq 'loadedtest')
- {
- $state = 'endrun';
- }
- elsif ($state eq 'pendingtest')
- {
- $state = 'pendingtest';
- }
- elsif ($state eq 'starttest' && $mode eq 'nonrestart')
- {
- # non restart mode, at last test.
- $state = 'endrun';
- }
- else
- {
- warn "WARNING: state: $state, expected: completedtest, loadedtest, pendingtest or starttest in non restart mode, log: $file";
- $state = 'endrun';
- }
+ $state = 'endtest';
}
- elsif ( ($tmp_test_id, $exit_status) = $_ =~ /^http:.*test=([^;]*);.* (EXIT STATUS: NORMAL.*)/)
+ else
{
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected endrun. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
-
- if ($state eq 'endrun')
- {
- $state = 'endrun';
- }
- elsif ($state eq 'completedtest')
- {
- dbg "previously pending test $test_id{$state} completed and is now endrun";
- $state = 'endrun';
- }
- else
- {
- warn "WARNING: state: $state, expected: endrun, log: $file";
- $state = 'endrun';
- }
+ warn "WARNING: state: $state, expected: runningtest, reportingtest, exitedtest, log: $file";
+ $state = 'endtest';
+ }
- if (! $test_reported{$tmp_test_id})
- {
- $test_result = 'UNKNOWN';
- $test_description = $exit_status . ' No test results reported. ' . join '; ', @messages;
-
- outputrecord $tmp_test_id, $test_description, $test_result;
- }
+ $test_id{$state} = $tmp_test_id;
+ }
+ elsif ( /^JavaScriptTest: End Run/)
+ {
+ dbg "End Run";
- $test_id{$state} = $tmp_test_id;
+ if ($state eq 'endtest')
+ {
+ $state = 'endrun';
}
- elsif ( ($tmp_test_id, $exit_status) = $_ =~ /^http:.*test=([^;]*);.* (EXIT STATUS: TIMED OUT.*)/)
+ else
{
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected endrun. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
-
- if ($state eq 'endrun')
- {
- $state = 'endrun';
- }
- else
- {
- dbg "state: $state, expected: endrun";
- $state = 'endrun';
- }
-
- $test_result = 'FAILED';
- $test_description = $exit_status . ' ' . join '; ', @messages;
-
- outputrecord $tmp_test_id, $test_description, $test_result;
-
- $test_id{$state} = $tmp_test_id;
+ warn "WARNING: state: $state, expected: endtest, log: $file";
+ $state = 'endrun';
}
- elsif ( ($tmp_test_id, $exit_status) = $_ =~ /^http:.*test=([^;]*);.* (EXIT STATUS: CRASHED.*)/)
+ }
+ elsif ($_ &&
+ !/^\s+$/ &&
+ !/^(STATUS:| *PASSED!| *FAILED!)/ &&
+ !/^JavaScriptTest:/ &&
+ !/^[*][*][*]/ &&
+ !/^[-+]{2,2}(WEBSHELL|DOMWINDOW)/ &&
+ !/^Spider:/ &&
+ !/real.*user.*sys.*$/ &&
+ !/user.*system.*elapsed/)
+ {
+ if ('runningtest, reportingtest' =~ /$state/)
{
- if ($test_id{$state} && $tmp_test_id ne $test_id{$state})
- {
- warn "WARNING: state: $state, expected endrun. mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
- }
- if ($state eq 'endrun')
- {
- $state = 'endrun';
- }
- else
+ if (/error: can.t allocate region/ || /set a breakpoint in malloc_error_break/ ||
+ /set a breakpoint in szone_error to debug/ || /malloc:.*mmap/ || /vm_allocate/ ||
+ /terminate called after throwing an instance of 'std::bad_alloc'/)
{
- dbg "state: $state, expected: endrun";
- $state = 'endrun';
+ dbg "Adding message: $_ converted to /$test_id{$state}:0: out of memory";
+ push @messages, ('/' . $test_id{$state} . ':0: out of memory');
}
-
- $test_result = 'FAILED';
- $test_description = $exit_status . ' ' . join '; ', @messages;;
-
- outputrecord $tmp_test_id, $test_description, $test_result;
-
- $test_id{$state} = $tmp_test_id;
- }
- elsif ( m@^(\/cygdrive\/.|\/.)?$test_dir$@)
- {
- if ($state eq 'endrun')
+ elsif (/\.js, line [0-9]+: out of memory/ )
{
- $state = 'success';
+ s/\.js, line ([0-9]+): out of memory/\.js:$1:/;
+ dbg "Adding message: $_ converted to /$test_id{$state}:0: out of memory";
+ push @messages, ('/' . $test_id{$state} . ':0: out of memory');
}
else
{
- warn "WARNING: state: $state, expected: endrun, log: $file";
- $state = 'success';
+ dbg "Adding message: $_";
+ push @messages, ($_);
}
-
- $test_id{$state} = $tmp_test_id;
}
- elsif (!/^ \=\>/ && !/^\s+$/ && !/^[*][*][*]/ && !/^[-+]{2,2}(WEBSHELL|DOMWINDOW)/ && !/^Spider:/ &&
- !/^JavaScriptTest:/ && !/real.*user.*sys.*$/ && !/user.*system.*elapsed/)
- {
- if ('starttest, loadingtest, runningtest, reportingtest, pendingtest, loadedtest, endrun, completedtest' =~ /$state/)
- {
+ }
+ elsif ($debug)
+ {
+ dbg "Skipping: $_";
+ }
- if (/error: can.t allocate region/ || /set a breakpoint in malloc_error_break/ ||
- /set a breakpoint in szone_error to debug/ || /malloc:.*mmap/ || /vm_allocate/ )
- {
- dbg "Adding message: $_ converted to /$test_id{$state}:0: out of memory";
- push @messages, ('/' . $test_id{$state} . ':0: out of memory');
- }
- else
- {
- dbg "Adding message: $_";
- push @messages, ($_);
- }
- }
+ if ($debug)
+ {
+ if ($test_id{$state})
+ {
+ dbg "test_id{$state}=$test_id{$state}, " . (join '; ', @messages);
}
-
- if ($debug)
+ else
{
- if ($test_id{$state})
- {
- dbg "test_id{$state}=$test_id{$state}, " . join '; ', @messages;
- }
- else
- {
- dbg "state=$state, " . join '; ', @messages;
- }
+ dbg "state=$state, " . (join '; ', @messages);
}
}
}
- close FILE;
-
- undef $test_branchid;
- undef $test_date;
- undef $test_buildtype;
- undef $test_machine;
- undef $test_product;
- undef $test_suite;
-
+ if ($state eq 'endrun')
+ {
+ $state = 'success';
+ }
die "FATAL ERROR: Test run terminated prematurely. state: $state, log: $file" if ($state ne 'success');
-}
+}
+close FILE;
close TEMP;
+undef $test_branchid;
+undef $test_date;
+undef $test_buildtype;
+undef $test_machine;
+undef $test_product;
+undef $test_suite;
+
outresults;
unlink $temp;
sub dbg {
if ($debug)
{
my $msg = shift;
print STDERR "DEBUG: $msg\n";
}
}
sub outresults
{
+ dbg "sorting temp file $temp";
system("sort < $temp | uniq");
+ dbg "finished sorting";
}
sub outputrecord
{
my ($test_id, $test_description, $test_result) = @_;
# cut off the extra jstest: summaries as they duplicate the other
# output and follow it.
$test_description =~ s/jstest:.*//;
- if (length($test_description) > 6000)
- {
- $test_description = substr($test_description, 0, 6000);
- }
+# if (length($test_description) > 6000)
+# {
+# $test_description = substr($test_description, 0, 6000);
+# }
+#
my $output =
- "TEST_ID=$test_id, TEST_BRANCH=$test_branchid, TEST_RESULT=$test_result, " .
- "TEST_BUILDTYPE=$test_buildtype, TEST_TYPE=$test_type, TEST_OS=$test_os, " .
- "TEST_MACHINE=$test_machine, TEST_PROCESSORTYPE=$test_processortype, " .
- "TEST_KERNEL=$test_kernel, TEST_DATE=$test_date, TEST_TIMEZONE=$test_timezone, " .
- "TEST_DESCRIPTION=$test_description\n";
+ "TEST_ID=$test_id, " .
+ "TEST_BRANCH=$test_branchid, " .
+ "TEST_BUILDTYPE=$test_buildtype, " .
+ "TEST_TYPE=$test_type, " .
+ "TEST_OS=$test_os, " .
+ "TEST_KERNEL=$test_kernel, " .
+ "TEST_PROCESSORTYPE=$test_processortype, " .
+ "TEST_MEMORY=$test_memory, " .
+ "TEST_CPUSPEED=$test_cpuspeed, " .
+ "TEST_TIMEZONE=$test_timezone, " .
+ "TEST_RESULT=$test_result, " .
+ "TEST_EXITSTATUS=$test_exit_status, " .
+ "TEST_DESCRIPTION=$test_description, " .
+ "TEST_MACHINE=$test_machine, " .
+ "TEST_DATE=$test_date" .
+ "\n";
if ($debug)
{
dbg "RECORD: $output";
}
print TEMP $output;
$test_reported{$test_id} = 1;
Index: process-logs.sh
===================================================================
RCS file: /cvsroot/mozilla/js/tests/process-logs.sh,v
retrieving revision 1.3
diff -p -U 8 -r1.3 process-logs.sh
--- process-logs.sh 3 Apr 2008 16:25:02 -0000 1.3
+++ process-logs.sh 25 Jun 2008 17:31:16 -0000
@@ -33,23 +33,23 @@
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
if [[ -z "$TEST_DIR" ]]; then
- cat <<EOF
+ cat <<EOF
`basename $0`: error
TEST_DIR, the location of the Sisyphus framework,
is required to be set prior to calling this script.
EOF
- exit 2
+ exit 2
fi
if [[ ! -e $TEST_DIR/bin/library.sh ]]; then
echo "TEST_DIR=$TEST_DIR"
echo ""
echo "This script requires the Sisyphus testing framework. Please "
echo "cvs check out the Sisyphys framework from mozilla/testing/sisyphus"
echo "and set the environment variable TEST_DIR to the directory where it"
@@ -69,54 +69,72 @@ usage()
usage: process-logs.sh.sh -l testlogfiles -A arch -K kernel
variable description
=============== ============================================================
testlogfiles The test log to be processed. If testlogfiles is a file
pattern it must be single quoted to prevent the shell from
expanding it before it is passed to the script.
+kernel optional. The machine kernel as specified by uname -r
+ If not specified, the script will attempt to determine the
+ value from the TEST_KERNEL line in the log.
+ 'all' - do not filter on machine kernel. Use this for
+ Windows.
+ For Linux distros, use the value of uname -r
+ and replace the minor version numbers with .* as in
+ 2.6.23.1-21.fc7 -> 2.6.23.*fc7
arch optional. The machine architecture as specified by uname -p
If not specified, the script will attempt to determine the
value from the TEST_PROCESSORTYPE line in each log.
'all' - do not filter on machine architecture. Use this
for Windows.
'i686' - Linux distros such as Fedora Core or RHEL or CentOS.
'i386' - Mac Intel
'powerpc' - Mac PowerPC
-kernel optional. The machine kernel as specified by uname -r
- If not specified, the script will attempt to determine the
- value from the TEST_KERNEL line in the log.
- 'all' - do not filter on machine kernel. Use this for
- Windows.
- For Linux distros, use the value of uname -r
- and replace the minor version numbers with .* as in
- 2.6.23.1-21.fc7 -> 2.6.23.*fc7
EOF
exit 2
}
while getopts "l:A:K:" optname;
- do
- case $optname in
- l) testlogfiles=$OPTARG;;
- A) optarch=$OPTARG;;
- K) optkernel=$OPTARG;;
- esac
+do
+ case $optname in
+ l) testlogfiles=$OPTARG;;
+ A) optarch=$OPTARG;;
+ K) optkernel=$OPTARG;;
+ esac
done
if [[ -z "$testlogfiles" ]]; then
usage
fi
for testlogfile in `ls $testlogfiles`; do
debug "testlogfile=$testlogfile"
+ case $testlogfile in
+ *.log)
+ worktestlogfile=$testlogfile
+ ;;
+ *.log.bz2)
+ worktestlogfile=`mktemp $testlogfile.XXXXXX`
+ bunzip2 -c $testlogfile > $worktestlogfile
+ ;;
+ *.log.gz)
+ worktestlogfile=`mktemp $testlogfile.XXXXXX`
+ gunzip -c $testlogfile > $worktestlogfile
+ ;;
+ *)
+ echo "unknown log type: $f"
+ exit 2
+ ;;
+ esac
+
case "$testlogfile" in
*,js,*) testtype=shell;;
*,firefox,*) testtype=browser;;
*) error "unknown testtype in logfile $testlogfile" $LINENO;;
esac
debug "testtype=$testtype"
@@ -128,72 +146,86 @@ for testlogfile in `ls $testlogfiles`; d
esac
debug "buildtype=$buildtype"
case "$testlogfile" in
*,1.8.0*) branch=1.8.0;;
*,1.8.1*) branch=1.8.1;;
*,1.9.0*) branch=1.9.0;;
+ *,1.9.1*) branch=1.9.1;;
*)
- branch=`grep '^environment: TEST_BRANCH=' $testlogfile | sed 's|.*TEST_BRANCH=\(.*\)|\1|'`
+ branch=`grep -m 1 '^environment: TEST_BRANCH=' $worktestlogfile | sed 's|.*TEST_BRANCH=\(.*\)|\1|'`
if [[ -z "$branch" ]]; then
error "unknown branch in logfile $testlogfile" $LINENO
fi
;;
esac
debug "branch=$branch"
case "$testlogfile" in
- *,win32,*) OSID=win32;;
+ *,nt,*) OSID=nt;;
*,linux,*) OSID=linux;;
- *,mac,*) OSID=mac;;
+ *,darwin,*) OSID=darwin;;
*)
- OSID=`grep '^environment: OSID=' $testlogfile | sed 's|.*OSID=\(.*\)|\1|'`
+ OSID=`grep -m 1 '^environment: OSID=' $worktestlogfile | sed 's|.*OSID=\(.*\)|\1|'`
if [[ -z "$OSID" ]]; then
error "unknown OS in logfile $testlogfile" $LINENO
fi
;;
esac
debug "OSID=$OSID"
if [[ -n "$optkernel" ]]; then
kernel="$optkernel"
else
- if [[ "$OSID" == "win32" ]]; then
- kernel=all
- else
- kernel=`grep '^environment: TEST_KERNEL=' $testlogfile | sed 's|.*TEST_KERNEL=\(.*\)|\1|'`
- kernel=`echo $kernel | sed 's|\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[-.0-9]*\.\([a-zA-Z0-9]*\)|\1.\2.\3.*\4|'`
+ kernel=`grep -m 1 '^environment: TEST_KERNEL=' $worktestlogfile | sed 's|.*TEST_KERNEL=\(.*\)|\1|'`
+ if [[ "$OSID" == "linux" ]]; then
+ kernel=`echo $kernel | sed 's|\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*|\1.\2.\3|'`
fi
fi
debug "kernel=$kernel"
if [[ -n "$optarch" ]]; then
arch="$optarch"
else
- if [[ "$OSID" == "win32" ]]; then
- arch=all
- else
- arch=`grep '^environment: TEST_PROCESSORTYPE=' $testlogfile | sed 's|.*TEST_PROCESSORTYPE=\(.*\)|\1|'`
- fi
+ arch=`grep -m 1 '^environment: TEST_PROCESSORTYPE=' $worktestlogfile | sed 's|.*TEST_PROCESSORTYPE=\(.*\)|\1|'`
fi
debug "arch=$arch"
+ memory=`grep -m 1 '^environment: TEST_MEMORY=' $worktestlogfile | sed 's|.*TEST_MEMORY=\(.*\)|\1|'`
+ speed=`grep -m 1 '^environment: TEST_CPUSPEED=' $worktestlogfile | sed 's|.*TEST_CPUSPEED=\(.*\)|\1|'`
+
timezone=`basename $testlogfile | sed 's|^[-0-9]*\([-+]\)\([0-9]\{4,4\}\),.*|\1\2|'`
debug "timezone=$timezone"
outputprefix=$testlogfile
includetests="included-$branch-$testtype-$buildtype.tests"
excludetests="excluded-$branch-$testtype-$buildtype.tests"
- grep '^include: ' $testlogfile | sed 's|include: ||' > $TEST_DIR/tests/mozilla.org/js/$includetests
- grep '^exclude: ' $testlogfile | sed 's|exclude: ||' > $TEST_DIR/tests/mozilla.org/js/$excludetests
-
- $TEST_DIR/tests/mozilla.org/js/known-failures.pl -b "$branch" -T "$buildtype" -t "$testtype" -o "$OSID" -z "$timezone" -l "$testlogfile" -A "$arch" -K "$kernel" -r "$TEST_JSDIR/failures.txt" -O "$outputprefix"
+ grep '^include: ' $worktestlogfile | sed 's|include: ||' > $TEST_DIR/tests/mozilla.org/js/$includetests
+ grep '^exclude: ' $worktestlogfile | sed 's|exclude: ||' > $TEST_DIR/tests/mozilla.org/js/$excludetests
+ $TEST_DIR/tests/mozilla.org/js/known-failures.pl \
+ -b "$branch" \
+ -T "$buildtype" \
+ -t "$testtype" \
+ -o "$OSID" \
+ -K "$kernel" \
+ -A "$arch" \
+ -M "$memory" \
+ -S "$speed" \
+ -z "$timezone" \
+ -r "$TEST_JSDIR/failures.txt" \
+ -l "$worktestlogfile" \
+ -O "$outputprefix"
+
+ if [[ "$testlogfile" != "$worktestlogfile" ]]; then
+ rm $worktestlogfile
+ unset worktestlogfile
+ fi
done
Index: remove-fixed-failures.sh
===================================================================
RCS file: remove-fixed-failures.sh
diff -N remove-fixed-failures.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ remove-fixed-failures.sh 25 Jun 2008 17:31:17 -0000
@@ -0,0 +1,82 @@
+#!/bin/bash
+# -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
+
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla JavaScript Testing Utilities
+#
+# The Initial Developer of the Original Code is
+# Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bob Clary <bclary@bclary.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+if [[ ! -e "$1" || ! -e "$2" ]]; then
+ cat <<EOF
+Usage: remove-fixed-failures.sh possible-fixes.log failures.log
+
+possible-fixes.log contains the possible fixes from the most recent
+test run.
+
+failures.log contains the current known failures.
+
+remove-fixed-failures.sh removes each pattern in possible-fixes.log
+from failures.log.
+
+The original failures.log is saved as failures.log.orig for safe keeping.
+
+EOF
+ exit 1
+fi
+
+fixes="$1"
+failures="$2"
+
+# save the original failures file in case of an error
+cp $failures $failures.orig
+
+# create a temporary file to contain the current list
+# of failures.
+workfailures=`mktemp working-failures.XXXXX`
+workfixes=`mktemp working-fixes.XXXXX`
+
+trap "rm -f $workfailures; rm -f $temp" EXIT
+
+# create working copy of the failures file
+cp $failures $workfailures
+cp $fixes $workfixes
+
+sed -i 's|:[^:]*\.log||' $workfixes;
+
+grep -Fv -f $workfixes ${workfailures} > ${workfailures}.temp
+
+mv $workfailures.temp $workfailures
+
+mv $workfailures $failures
+
Index: runtests.sh
===================================================================
RCS file: /cvsroot/mozilla/js/tests/runtests.sh,v
retrieving revision 1.14
diff -p -U 8 -r1.14 runtests.sh
--- runtests.sh 1 May 2008 23:38:29 -0000 1.14
+++ runtests.sh 25 Jun 2008 17:31:17 -0000
@@ -33,23 +33,23 @@
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
if [[ -z "$TEST_DIR" ]]; then
- cat <<EOF
+ cat <<EOF
`basename $0`: error
TEST_DIR, the location of the Sisyphus framework,
is required to be set prior to calling this script.
EOF
- exit 2
+ exit 2
fi
if [[ ! -e $TEST_DIR/bin/library.sh ]]; then
echo "TEST_DIR=$TEST_DIR"
echo ""
echo "This script requires the Sisyphus testing framework. Please "
echo "cvs check out the Sisyphys framework from mozilla/testing/sisyphus"
echo "and set the environment variable TEST_DIR to the directory where it"
@@ -61,78 +61,75 @@ fi
source $TEST_DIR/bin/library.sh
TEST_JSDIR=`dirname $0`
usage()
{
cat <<EOF
-usage: runtests.sh -p products -b branches -T buildtypes -B buildcommands -e extra [-v] \\
- -S -R -X excludetests -I includetests -c -t
+usage: runtests.sh -p products -b branches -e extra\\
+ -T buildtypes -B buildcommands \\
+ [-v] [-S] [-X excludetests] [-I includetests] [-c] [-t] \\
+ [-Z n]
variable description
=============== ============================================================
-p products space separated list of js, firefox
--b branches space separated list of branches 1.8.0, 1.8.1, 1.9.0
--T buildtypes space separated list of build types opt debug
+-b branches space separated list of branches 1.8.0, 1.8.1, 1.9.0, 1.9.1
-e extra optional. extra qualifier to pick build tree and mozconfig.
+-T buildtypes space separated list of build types opt debug
-B buildcommands optional space separated list of build commands
clean, checkout, build. If not specified, defaults to
'clean checkout build'.
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
--R optional. by default the browser test will start Firefox
- Spider and execute the tests one after another in the same
- process. -R will start an new instance of Firefox for each
- test. This has no effect for shell based tests.
-X excludetests optional. By default the test will exclude the
tests listed in spidermonkey-n-\$branch.tests,
performance-\$branch.tests. excludetests is a list of either
individual tests, manifest files or sub-directories which
will override the default exclusion list.
-I includetests optional. By default the test will include the
JavaScript tests appropriate for the branch. includetests is a
list of either individual tests, manifest files or
sub-directories which will override the default inclusion
list.
--Z n optional. Set gczeal to n. Currently, only valid for
- Gecko 1.9.0 and later.
-c optional. By default the test will exclude tests
which crash on this branch, test type, build type and
operating system. -c will include tests which crash.
Typically this should only be used in combination with -R.
This has no effect on shell based tests which execute crash
tests regardless.
-t optional. By default the test will exclude tests
which time out on this branch, test type, build type and
operating system. -t will include tests which timeout.
+-Z n optional. Set gczeal to n. Currently, only valid for
+ debug builds of Gecko 1.8.1.15, 1.9.0 and later.
if an argument contains more than one value, it must be quoted.
EOF
exit 2
}
verbose=0
-while getopts "p:b:T:B:e:X:I:Z:vSRct" optname;
+while getopts "p:b:T:B:e:X:I:Z:vSct" optname;
do
case $optname in
p) products=$OPTARG;;
b) branches=$OPTARG;;
T) buildtypes=$OPTARG;;
e) extra="$OPTARG"
extraflag="-e $OPTARG";;
B) buildcommands=$OPTARG;;
v) verbose=1
verboseflag="-v";;
- R) restart=1;;
S) summary=1;;
X) excludetests=$OPTARG;;
I) includetests=$OPTARG;;
Z) gczeal="-Z $OPTARG";;
c) crashes=1;;
t) timeouts=1;;
esac
done
@@ -175,68 +172,66 @@ testlogfiles="`grep '^log:' $testlogfile
fatalerrors=`grep 'FATAL ERROR' $testlogfiles | cat`
if [[ -n "$fatalerrors" ]]; then
testlogarray=( $testlogfiles )
let itestlog=${#testlogarray[*]}-1
error "`tail -n 20 ${testlogarray[$itestlog]}`" $LINENO
fi
-case "$OSID" in
- win32)
- arch=all
- kernel=all
- ;;
- linux)
- arch="`uname -p`"
- kernel="`uname -r | sed 's|\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[-.0-9]*\.\([a-zA-Z0-9]*\)|\1.\2.\3.*\4|'`"
- ;;
- mac)
- arch="`uname -p`"
- kernel=all
- ;;
- *)
- error "$OSID not supported" $LINENO
- ;;
-esac
-
for testlogfile in $testlogfiles; do
if [[ -n "$DEBUG" ]]; then
dumpvars testlogfile
fi
case "$testlogfile" in
*,js,*) testtype=shell;;
*,firefox,*) 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
+
case "$testlogfile" in
*,1.8.0*) branch=1.8.0;;
*,1.8.1*) branch=1.8.1;;
*,1.9.0*) branch=1.9.0;;
+ *,1.9.1*) branch=1.9.1;;
*) error "unknown branch in logfile $testlogfile" $LINENO;;
esac
outputprefix=$testlogfile
if [[ -n "$DEBUG" ]]; then
- dumpvars branch buildtype testtype OSID testlogfile arch kernel outputprefix
+ 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 -t $testtype -o "$OSID" -z `date +%z` -l $testlogfile -A "$arch" -K "$kernel" -r $TEST_JSDIR/failures.txt -O $outputprefix; then
+ if ! $TEST_DIR/tests/mozilla.org/js/known-failures.pl \
+ -b $branch \
+ -T $buildtype \
+ -t $testtype \
+ -o "$OSID" \
+ -K "$TEST_KERNEL" \
+ -A "$TEST_PROCESSORTYPE" \
+ -M "$TEST_MEMORY" \
+ -S "$TEST_CPUSPEED" \
+ -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
@@ -247,11 +242,11 @@ for testlogfile in $testlogfiles; do
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:<div title=\"$testlogfile\">\n"
echo -e "\nTinderboxPrint:js tests<br/>$branch $buildtype $testtype<br/>$npass/$nfail<br/>F:$nfixes R:$nregressions"
echo -e "\nTinderboxPrint:</div>\n"
-
fi
+
done
Index: shell.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/shell.js,v
retrieving revision 1.6
diff -p -U 8 -r1.6 shell.js
--- shell.js 25 Apr 2008 17:52:13 -0000 1.6
+++ shell.js 25 Jun 2008 17:31:17 -0000
@@ -155,18 +155,18 @@ function TestCase(n, d, e, a)
}
TestCase.prototype.dump = function () {
dump('\njstest: ' + this.path + ' ' +
'bug: ' + this.bugnumber + ' ' +
'result: ' + (this.passed ? 'PASSED':'FAILED') + ' ' +
'type: ' + this.type + ' ' +
'description: ' + toPrinted(this.description) + ' ' +
- 'expected: ' + toPrinted(this.expect) + ' ' +
- 'actual: ' + toPrinted(this.actual) + ' ' +
+// 'expected: ' + toPrinted(this.expect) + ' ' +
+// 'actual: ' + toPrinted(this.actual) + ' ' +
'reason: ' + toPrinted(this.reason) + '\n');
};
/*
* The test driver searches for such a phrase in the test output.
* If such phrase exists, it will set n as the expected exit code.
*/
function expectExitCode(n)
Index: test-browser.sh
===================================================================
RCS file: test-browser.sh
diff -N test-browser.sh
--- test-browser.sh 1 May 2008 23:38:30 -0000 1.12
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,336 +0,0 @@
-#!/bin/bash -e
-# -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
-
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla JavaScript Testing Utilities
-#
-# The Initial Developer of the Original Code is
-# Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s): Bob Clary <bclary@bclary.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-if [[ -z "$TEST_DIR" ]]; then
- cat <<EOF
-`basename $0`: error
-
-TEST_DIR, the location of the Sisyphus framework,
-is required to be set prior to calling this script.
-EOF
- exit 2
-fi
-
-if [[ ! -e $TEST_DIR/bin/library.sh ]]; then
- echo "TEST_DIR=$TEST_DIR"
- echo ""
- echo "This script requires the Sisyphus testing framework. Please "
- echo "cvs check out the Sisyphys framework from mozilla/testing/sisyphus"
- echo "and set the environment variable TEST_DIR to the directory where it"
- echo "located."
- echo ""
-
- exit 2
-fi
-
-source $TEST_DIR/bin/library.sh
-
-TEST_JSDIR=`dirname $0`
-
-TEST_JSEACH_TIMEOUT=${TEST_JSEACH_TIMEOUT:-485}
-TEST_JSEACH_PAGE_TIMEOUT=${TEST_JSEACH_PAGE_TIMEOUT:-480}
-TEST_JSALL_TIMEOUT=${TEST_JSALL_TIMEOUT:-21600}
-TEST_WWW_JS=`echo $TEST_JSDIR|sed "s|$TEST_DIR||"`
-
-#
-# options processing
-#
-usage()
-{
- cat <<EOF
-usage: $SCRIPT -p product -b branch -T buildtype -x executablepath -N profilename \\
- -R -X excludetests -I includetests -c -t -F [-d datafiles]
-
-variable description
-=============== ============================================================
--p product required. firefox|thunderbird
--b branch required. 1.8.0|1.8.1|1.9.0
--T buildtype required. one of opt debug
--x executablepath required. directory-tree containing executable 'product'
--N profilename required. profile name
--R optional. by default the browser test will start Firefox
- spider and execute the tests one after another in the same
- process. -R will start an new instance of Firefox for each
- test.
--X excludetests optional. By default the test will exclude the
- tests listed in spidermonkey-n-\$branch.tests,
- performance-\$branch.tests. excludetests is a list of either
- individual tests, manifest files or sub-directories which
- will override the default exclusion list.
--I includetests optional. By default the test will include the
- JavaScript tests appropriate for the branch. includetests is a
- list of either individual tests, manifest files or
- sub-directories which will override the default inclusion
- list.
--Z n Set gczeal to n. Only valid for Gecko 1.9.0 and later.
--c optional. By default the test will exclude tests
- which crash on this branch, test type, build type and
- operating system. -c will include tests which crash.
- Typically this should only be used in combination with -R.
- This has no effect on shell based tests which execute crash
- tests regardless.
--t optional. By default the test will exclude tests
- which time out on this branch, test type, build type and
- operating system. -t will include tests which timeout.
--F optional. Just generate file lists without running any tests.
--d datafiles optional. one or more filenames of files containing
- environment variable definitions to be included.
-
- note that the environment variables should have the same
- names as in the "variable" column.
-
-if an argument contains more than one value, it must be quoted.
-EOF
- exit 2
-}
-
-while getopts "p:b:T:x:N:d:X:I:Z:RctF" optname
-do
- case $optname in
- p) product=$OPTARG;;
- b) branch=$OPTARG;;
- T) buildtype=$OPTARG;;
- N) profilename=$OPTARG;;
- x) executablepath=$OPTARG;;
- R) restart=1;;
- X) excludetests=$OPTARG;;
- I) includetests=$OPTARG;;
- c) crashes=1;;
- t) timeouts=1;;
- F) filesonly=1;;
- Z) gczeal=";gczeal=$OPTARG";;
- d) datafiles=$OPTARG;;
- esac
-done
-
-# include environment variables
-if [[ -n "$datafiles" ]]; then
- for datafile in $datafiles; do
- source $datafile
- done
-fi
-
-dumpvars product branch buildtype profilename executablepath restart excludetests includetests crashes timeouts filesonly gczeal datafiles | sed "s|^|arguments: |"
-
-if [[ -z "$product" || -z "$branch" || -z "$executablepath" || -z "$profilename" ]]; then
- usage
-fi
-
-executable=`get_executable $product $branch $executablepath`
-
-pushd $TEST_JSDIR
-
-rm -f finished-$branch-browser-$buildtype
-
-if ! make failures.txt; then
- error "during make failures.txt" $LINENO
-fi
-
-includetestsfile="included-$branch-browser-$buildtype.tests"
-rm -f $includetestsfile
-touch $includetestsfile
-
-if [[ -z "$includetests" ]]; then
- # by default include tests appropriate for the branch
- includetests="e4x ecma ecma_2 ecma_3 js1_1 js1_2 js1_3 js1_4 js1_5 js1_6"
-
- case "$branch" in
- 1.8.0)
- ;;
- 1.8.1)
- includetests="$includetests js1_7"
- ;;
- 1.9.0)
- includetests="$includetests js1_7 js1_8"
- ;;
- esac
-fi
-
-for i in $includetests; do
- if [[ -f "$i" ]]; then
- echo "# including $i" >> $includetestsfile
- if echo $i | grep -q '\.js$'; then
- echo $i >> $includetestsfile
- else
- cat $i >> $includetestsfile
- fi
- elif [[ -d "$i" ]]; then
- find $i -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $includetestsfile
- fi
-done
-
-excludetestsfile="excluded-$branch-browser-$buildtype.tests"
-rm -f $excludetestsfile
-touch $excludetestsfile
-
-if [[ -z "$excludetests" ]]; then
- excludetests="spidermonkey-n-$branch.tests performance-$branch.tests"
-fi
-
-for e in $excludetests; do
- if [[ -f "$e" ]]; then
- echo "# excluding $e" >> $excludetestsfile
- if echo $e | grep -q '\.js$'; then
- echo $e >> $excludetestsfile
- else
- cat $e >> $excludetestsfile
- fi
- elif [[ -d "$e" ]]; then
- find $e -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $excludetestsfile
- fi
-done
-
-case "$OSID" in
- win32)
- arch='.*'
- kernel='.*'
- ;;
- linux)
- arch="`uname -p`"
- kernel="`uname -r | sed 's|\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[-.0-9]*\.\([a-zA-Z0-9]*\)|\1.\2.\3.*\4|'`"
- ;;
- mac)
- arch="`uname -p`"
- kernel='[^,]*'
- ;;
- *)
- error "$OSID not supported" $LINENO
- ;;
-esac
-
-if [[ -z "$timeouts" ]]; then
- echo "# exclude tests that time out" >> $excludetestsfile
- egrep "TEST_BRANCH=([^,]*$branch[^,]*|[.][*]), TEST_RESULT=FAILED, TEST_BUILDTYPE=([^,]*$buildtype[^,]*|[.][*]), TEST_TYPE=([^,]*browser[^,]*|[.][*]), TEST_OS=([^,]*$OSID[^,]*|[.][*]), .*, TEST_PROCESSORTYPE=([^,]*$arch[^,]*|[.][*]), TEST_KERNEL=([^,]*$kernel[^,]*|[.][*]), .*, TEST_DESCRIPTION=.*EXIT STATUS: TIMED OUT" \
- failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetestsfile
-fi
-
-if [[ -z "$crashes" ]]; then
- echo "# exclude tests that crash" >> $excludetestsfile
- pattern="TEST_BRANCH=([^,]*$branch[^,]*|[.][*]), TEST_RESULT=FAILED, TEST_BUILDTYPE=([^,]*$buildtype[^,]*|[.][*]), TEST_TYPE=([^,]*browser[^,]*|[.][*]), TEST_OS=([^,]*$OSID[^,]*|[.][*]), .*, TEST_PROCESSORTYPE=([^,]*$arch[^,]*|[.][*]), TEST_KERNEL=([^,]*$kernel[^,]*|[.][*]), .*, TEST_DESCRIPTION=.*"
- case "$buildtype" in
- opt)
- pattern="${pattern}EXIT STATUS: CRASHED"
- ;;
- debug)
- pattern="${pattern}(EXIT STATUS: CRASHED|Assertion failure:)"
- ;;
- esac
- egrep "$pattern" failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetestsfile
-
-fi
-
-urllist="urllist-$branch-browser-$buildtype.tests"
-urlhtml="urllist-$branch-browser-$buildtype.html"
-
-rm -f $urllist $urlhtml
-
-cat > $urlhtml <<EOF
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JavaScript Tests</title>
-</head>
-<body>
-<ul>
-EOF
-
-cat $includetestsfile | while read jsfile
-do
- if echo $jsfile | grep -q '^#'; then
- continue
- fi
-
- if ! grep -q $jsfile $excludetestsfile; then
-
- result=`echo $jsfile | sed 's/.*js\([0-9]\)_\([0-9]\).*/\1.\2/'`
-
- case $result in
- 1.5) version=";version=1.5";;
- 1.6) version=";version=1.6";;
- 1.7) version=";version=1.7";;
- 1.8) version=";version=1.8";;
- 1.9) version=";version=1.9";;
- 2.0) version=";version=2.0";;
- *) version="";;
- esac
-
- echo "http://$TEST_HTTP/$TEST_WWW_JS/js-test-driver-standards.html?test=$jsfile;language=type;text/javascript$version$gczeal" >> $urllist
- echo "<li><a href='http://$TEST_HTTP/$TEST_WWW_JS/js-test-driver-standards.html?test=$jsfile;language=type;text/javascript$version$gczeal'>$jsfile</a></li>" >> $urlhtml
- fi
-done
-
-cat >> $urlhtml <<EOF
-</ul>
-</body>
-</html>
-EOF
-
-chmod a+r $urlhtml
-
-cat $includetestsfile | sed 's|^|include: |'
-cat $excludetestsfile | sed 's|^|exclude: |'
-
-if [[ -z "$filesonly" ]]; then
- if [[ "$restart" == "1" ]]; then
- cat "$urllist" | while read url;
- do
- edit-talkback.sh -p "$product" -b "$branch" -x "$executablepath" -i "$url"
- if time timed_run.py $TEST_JSEACH_TIMEOUT "$url" \
- "$executable" -P "$profilename" \
- -spider -start -quit \
- -uri "$url" \
- -depth 0 -timeout "$TEST_JSEACH_PAGE_TIMEOUT" \
- -hook "http://$TEST_HTTP/$TEST_WWW_JS/userhookeach.js"; then
- true;
- fi
-
- done
- else
- edit-talkback.sh -p "$product" -b "$branch" -x "$executablepath" -i "http://$TEST_HTTP/$TEST_WWW_JS/$urlhtml"
- if ! time timed_run.py $TEST_JSALL_TIMEOUT "http://$TEST_HTTP/$TEST_WWW_JS/$urlhtml" \
- "$executable" -P "$profilename" \
- -spider -start -quit \
- -uri "http://$TEST_HTTP/$TEST_WWW_JS/$urlhtml" \
- -depth 1 -timeout "$TEST_JSEACH_PAGE_TIMEOUT" \
- -hook "http://$TEST_HTTP/$TEST_WWW_JS/userhookeach.js"; then
- error "timed_run.py ended abnormally: $?" $LINENO
- fi
- fi
-fi
-
-popd
Index: test-shell.sh
===================================================================
RCS file: test-shell.sh
diff -N test-shell.sh
--- test-shell.sh 1 May 2008 23:38:30 -0000 1.11
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,261 +0,0 @@
-#!/bin/bash -e
-# -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
-
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla JavaScript Testing Utilities
-#
-# The Initial Developer of the Original Code is
-# Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s): Bob Clary <bclary@bclary.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-if [[ -z "$TEST_DIR" ]]; then
- cat <<EOF
-`basename $0`: error
-
-TEST_DIR, the location of the Sisyphus framework,
-is required to be set prior to calling this script.
-EOF
- exit 2
-fi
-
-if [[ ! -e $TEST_DIR/bin/library.sh ]]; then
- echo "TEST_DIR=$TEST_DIR"
- echo ""
- echo "This script requires the Sisyphus testing framework. Please "
- echo "cvs check out the Sisyphys framework from mozilla/testing/sisyphus"
- echo "and set the environment variable TEST_DIR to the directory where it"
- echo "located."
- echo ""
-
- exit 2
-fi
-
-source $TEST_DIR/bin/library.sh
-
-TEST_JSDIR=`dirname $0`
-TEST_JSSHELL_TIMEOUT=${TEST_JSSHELL_TIMEOUT:-480}
-
-#
-# options processing
-#
-usage()
-{
- cat <<EOF
-usage: $SCRIPT -b branch -s sourcepath -T buildtype [-d datafiles]
-
-variable description
-=============== ===========================================================
--p product required. js
--b branch required. 1.8.0|1.8.1|1.9.0
--s sourcepath required. path to js shell source directory mozilla/js/src
--T buildtype required. one of opt debug
--X excludetests optional. By default the test will exclude the
- tests listed in spidermonkey-n-\$branch.tests,
- performance-\$branch.tests. excludetests is a list of either
- individual tests, manifest files or sub-directories which
- will override the default exclusion list.
--I includetests optional. By default the test will include the
- JavaScript tests appropriate for the branch. includetests is a
- list of either individual tests, manifest files or
- sub-directories which will override the default inclusion
- list.
--Z n optional. Set gczeal to n. Currently, only valid for
- Gecko 1.9.0 and later.
--c optional. By default the test will exclude tests
- which crash on this branch, test type, build type and
- operating system. -c will include tests which crash.
- Typically this should only be used in combination with -R.
- This has no effect on shell based tests which execute crash
- tests regardless.
--t optional. By default the test will exclude tests
- which time out on this branch, test type, build type and
- operating system. -t will include tests which timeout.
--d datafiles optional. one or more filenames of files containing
- environment variable definitions to be included.
-
-EOF
- exit 2
-}
-
-while getopts "b:s:T:d:X:I:Z:ct" optname
-do
- case $optname in
- b) branch=$OPTARG;;
- s) sourcepath=$OPTARG;;
- T) buildtype=$OPTARG;;
- X) excludetests=$OPTARG;;
- I) includetests=$OPTARG;;
- C) crashes=1;;
- T) timeouts=1;;
- Z) gczeal="-Z $OPTARG";;
- d) datafiles=$OPTARG;;
- esac
-done
-
-# include environment variables
-if [[ -n "$datafiles" ]]; then
- for datafile in $datafiles; do
- source $datafile
- done
-fi
-
-dumpvars branch sourcepath buildtype excludetests includetests crashes timeouts gczeal datafiles | sed "s|^|arguments: |"
-
-if [[ -z "$branch" || -z "$sourcepath" || -z "$buildtype" ]]; then
- usage
-fi
-
-pushd $TEST_JSDIR
-
-rm -f finished-$branch-shell-$buildtype
-
-. config.sh
-
-executable="$sourcepath/$JS_OBJDIR/js$EXE_EXT"
-
-if ! make failures.txt; then
- error "during make failures.txt" $LINENO
-fi
-
-#includetestsfile=`mktemp includetestsfile.XXXXX`
-includetestsfile="included-$branch-shell-$buildtype.tests"
-rm -f $includetestsfile
-touch $includetestsfile
-
-if [[ -z "$includetests" ]]; then
-
- # by default include tests appropriate for the branch
- includetests="e4x ecma ecma_2 ecma_3 js1_1 js1_2 js1_3 js1_4 js1_5 js1_6"
-
- case "$branch" in
- 1.8.0)
- ;;
- 1.8.1)
- includetests="$includetests js1_7"
- ;;
- 1.9.0)
- includetests="$includetests js1_7 js1_8"
- ;;
- esac
-fi
-
-for i in $includetests; do
- if [[ -f "$i" ]]; then
- echo "# including $i" >> $includetestsfile
- if echo $i | grep -q '\.js$'; then
- echo $i >> $includetestsfile
- else
- cat $i >> $includetestsfile
- fi
- elif [[ -d "$i" ]]; then
- find $i -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $includetestsfile
- fi
-done
-
-#excludetestsfile=`mktemp excludetestsfile.XXXXX`
-excludetestsfile="excluded-$branch-shell-$buildtype.tests"
-rm -f $excludetestsfile
-touch $excludetestsfile
-
-if [[ -z "$excludetests" ]]; then
- excludetests="spidermonkey-n-$branch.tests performance-$branch.tests"
-fi
-
-for e in $excludetests; do
- if [[ -f "$e" ]]; then
- echo "# excluding $e" >> $excludetestsfile
- if echo $e | grep -q '\.js$'; then
- echo $e >> $excludetestsfile
- else
- cat $e >> $excludetestsfile
- fi
- elif [[ -d "$e" ]]; then
- find $e -name '*.js' -print | egrep -v '(shell|browser|template|userhook.*|\.#.*).js' | sed 's/^\.\///' | sort >> $excludetestsfile
- fi
-done
-
-case "$OSID" in
- win32)
- arch='.*'
- kernel='.*'
- ;;
- linux)
- arch="`uname -p`"
- kernel="`uname -r | sed 's|\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[-.0-9]*\.\([a-zA-Z0-9]*\)|\1.\2.\3.*\4|'`"
- ;;
- mac)
- arch="`uname -p`"
- kernel='[^,]*'
- ;;
- *)
- error "$product-$branch-$buildtype: $OSID not supported" $LINENO
- ;;
-esac
-
-if [[ -z "$timeouts" ]]; then
- echo "# exclude tests that time out" >> $excludetestsfile
- egrep "TEST_BRANCH=([^,]*$branch[^,]*|[.][*]), TEST_RESULT=FAILED, TEST_BUILDTYPE=([^,]*$buildtype[^,]*|[.][*]), TEST_TYPE=([^,]*shell[^,]*|[.][*]), TEST_OS=([^,]*$OSID[^,]*|[.][*]), .*, TEST_PROCESSORTYPE=([^,]*$arch[^,]*|[.][*]), TEST_KERNEL=([^,]*$kernel[^,]*|[.][*]), .*, TEST_DESCRIPTION=.*EXIT STATUS: TIMED OUT" \
- failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetestsfile
-fi
-
-if [[ -z "$crashes" ]]; then
- echo "# exclude tests that crash" >> $excludetestsfile
- pattern="TEST_BRANCH=([^,]*$branch[^,]*|[.][*]), TEST_RESULT=FAILED, TEST_BUILDTYPE=([^,]*$buildtype[^,]*|[.][*]), TEST_TYPE=([^,]*shell[^,]*|[.][*]), TEST_OS=([^,]*$OSID[^,]*|[.][*]), .*, TEST_PROCESSORTYPE=([^,]*$arch[^,]*|[.][*]), TEST_KERNEL=([^,]*$kernel[^,]*|[.][*]), .*, TEST_DESCRIPTION=.*"
- case "$buildtype" in
- opt)
- pattern="${pattern}EXIT STATUS: CRASHED"
- ;;
- debug)
- pattern="${pattern}(EXIT STATUS: CRASHED|Assertion failure:)"
- ;;
- esac
- egrep "$pattern" failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetestsfile
-
-fi
-
-cat $includetestsfile | sed 's|^|include: |'
-cat $excludetestsfile | sed 's|^|exclude: |'
-
-if ! time perl jsDriver.pl \
- -l $includetestsfile \
- -L $excludetestsfile \
- -s $executable \
- -e sm$buildtype \
- -o "-S 524288 $gczeal" \
- -R \
- -T $TEST_JSSHELL_TIMEOUT \
- -f /dev/null \
- -Q; then
- error "$product-$branch-$buildtype-$OSID: jsDriver.pl" $LINENO
-fi
-
-popd
Index: test.sh
===================================================================
RCS file: /cvsroot/mozilla/js/tests/test.sh,v
retrieving revision 1.8
diff -p -U 8 -r1.8 test.sh
--- test.sh 10 Apr 2008 20:35:58 -0000 1.8
+++ test.sh 25 Jun 2008 17:31:17 -0000
@@ -33,23 +33,23 @@
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
if [[ -z "$TEST_DIR" ]]; then
- cat <<EOF
+ cat <<EOF
`basename $0`: error
TEST_DIR, the location of the Sisyphus framework,
is required to be set prior to calling this script.
EOF
- exit 2
+ exit 2
fi
if [[ ! -e $TEST_DIR/bin/library.sh ]]; then
echo "TEST_DIR=$TEST_DIR"
echo ""
echo "This script requires the Sisyphus testing framework. Please "
echo "cvs check out the Sisyphys framework from mozilla/testing/sisyphus"
echo "and set the environment variable TEST_DIR to the directory where it"
@@ -58,60 +58,356 @@ if [[ ! -e $TEST_DIR/bin/library.sh ]];
exit 2
fi
source $TEST_DIR/bin/library.sh
TEST_JSDIR=`dirname $0`
+TEST_JSSHELL_TIMEOUT=${TEST_JSSHELL_TIMEOUT:-480}
+TEST_JSEACH_TIMEOUT=${TEST_JSEACH_TIMEOUT:-485}
+TEST_JSEACH_PAGE_TIMEOUT=${TEST_JSEACH_PAGE_TIMEOUT:-480}
+TEST_JSALL_TIMEOUT=${TEST_JSALL_TIMEOUT:-21600}
+TEST_WWW_JS=`echo $TEST_JSDIR|sed "s|$TEST_DIR||"`
+
#
# options processing
#
usage()
{
cat <<EOF
-usage: $SCRIPT -d datafiles
-
-This script is used to dispatch to either test-browser.sh
-for browser based JavaScript tests or test-shell.js for
-shell based JavaScript tests. It ignores all input arguments
-except -d datafiles which it uses to pass data to the
-appropriate script.
+usage: test.sh -p product -b branch -T buildtype -x executablepath -N profilename \\
+ [-X excludetests] [-I includetests] [-c] [-t] [-F] [-d datafiles]
variable description
=============== ============================================================
+-p product required. firefox|thunderbird|js
+-b branch required. 1.8.0|1.8.1|1.9.0|1.9.1
+-s sourcepath required for shell. path to js shell source directory mozilla/js/src
+-T buildtype required. one of opt debug
+-x executablepath required for browser. directory-tree containing executable 'product'
+-N profilename required for browser. profile name
+-X excludetests optional. By default the test will exclude the
+ tests listed in spidermonkey-n-\$branch.tests,
+ performance-\$branch.tests. excludetests is a list of either
+ individual tests, manifest files or sub-directories which
+ will override the default exclusion list.
+-I includetests optional. By default the test will include the
+ JavaScript tests appropriate for the branch. includetests is a
+ list of either individual tests, manifest files or
+ sub-directories which will override the default inclusion
+ list.
+-c optional. By default the test will exclude tests
+ which crash on this branch, test type, build type and
+ operating system. -c will include tests which crash.
+ Typically this should only be used in combination with -R.
+ This has no effect on shell based tests which execute crash
+ tests regardless.
+-t optional. By default the test will exclude tests
+ which time out on this branch, test type, build type and
+ operating system. -t will include tests which timeout.
+-Z n optional. Set gczeal to n. Currently, only valid for
+ debug builds of Gecko 1.8.1.15, 1.9.0 and later.
+-F optional. Just generate file lists without running any tests.
-d datafiles optional. one or more filenames of files containing
environment variable definitions to be included.
--Z n optional. Set gczeal to n. Currently, only valid for
- Gecko 1.9.0 and later.
+
+ note that the environment variables should have the same
+ names as in the "variable" column.
+
if an argument contains more than one value, it must be quoted.
EOF
exit 2
}
-unset datafiles
-
-while getopts "d:Z:" optname ;
+while getopts "p:b:s:T:x:N:d:X:I:Z:RctF" optname
do
case $optname in
+ p)
+ product=$OPTARG;;
+ b)
+ branch=$OPTARG;;
+ T)
+ buildtype=$OPTARG;;
+ s)
+ sourcepath=$OPTARG;;
+ N)
+ profilename=$OPTARG;;
+ x)
+ executablepath=$OPTARG;;
+ X)
+ excludetests=$OPTARG;;
+ I)
+ includetests=$OPTARG;;
+ c)
+ crashes=1;;
+ t)
+ timeouts=1;;
+ F)
+ filesonly=1;;
+ Z)
+ gczealshell="-Z $OPTARG"
+ gczealbrowser=";gczeal=$OPTARG"
+ ;;
d) datafiles=$OPTARG;;
- Z) gczeal="-Z $OPTARG";;
esac
done
-if [[ -z "$datafiles" ]]; then
- usage
+# include environment variables
+if [[ -n "$datafiles" ]]; then
+ for datafile in $datafiles; do
+ source $datafile
+ done
+fi
+
+if [[ -n "$gczeal" && "$buildtype" != "debug" ]]; then
+ error "gczeal is supported for buildtype debug and not $buildtype"
+fi
+
+dumpvars product branch buildtype sourcepath profilename executablepath excludetests includetests crashes timeouts filesonly gczeal datafiles | sed "s|^|arguments: |"
+
+pushd $TEST_JSDIR
+
+case $product in
+ js)
+ if [[ -z "$branch" || -z "$buildtype" || -z "$sourcepath" ]]; then
+ usage
+ fi
+ source config.sh
+ testtype=shell
+ executable="$sourcepath/$JS_OBJDIR/js$EXE_EXT"
+ ;;
+
+ firefox|thunderbird)
+ if [[ -z "$branch" || -z "$buildtype" || -z "$executablepath" || -z "$profilename" ]]; then
+ usage
+ fi
+ testtype=browser
+ executable=`get_executable $product $branch $executablepath`
+
+ ;;
+ *)
+ echo "Unknown product: $product"
+ usage
+ ;;
+esac
+
+rm -f finished-$branch-$testtype-$buildtype
+
+if ! make failures.txt; then
+ error "during make failures.txt" $LINENO
+fi
+
+includetestsfile="included-$branch-$testtype-$buildtype.tests"
+rm -f $includetestsfile
+touch $includetestsfile
+
+if [[ -z "$includetests" ]]; then
+ # by default include tests appropriate for the branch
+ includetests="e4x ecma ecma_2 ecma_3 js1_1 js1_2 js1_3 js1_4 js1_5 js1_6"
+
+ case "$branch" in
+ 1.8.0)
+ ;;
+ 1.8.1)
+ includetests="$includetests js1_7"
+ ;;
+ 1.9.0)
+ includetests="$includetests js1_7 js1_8"
+ ;;
+ 1.9.1)
+ includetests="$includetests js1_7 js1_8"
+ ;;
+ esac
+fi
+
+for i in $includetests; do
+ if [[ -f "$i" ]]; then
+ echo "# including $i" >> $includetestsfile
+ if echo $i | grep -q '\.js$'; then
+ echo $i >> $includetestsfile
+ else
+ cat $i >> $includetestsfile
+ fi
+ elif [[ -d "$i" ]]; then
+ find $i -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $includetestsfile
+ fi
+done
+
+excludetestsfile="excluded-$branch-$testtype-$buildtype.tests"
+rm -f $excludetestsfile
+touch $excludetestsfile
+
+if [[ -z "$excludetests" ]]; then
+ excludetests="spidermonkey-n-$branch.tests performance-$branch.tests"
fi
-for data in $datafiles; do
- source $data
+for e in $excludetests; do
+ if [[ -f "$e" ]]; then
+ echo "# excluding $e" >> $excludetestsfile
+ if echo $e | grep -q '\.js$'; then
+ echo $e >> $excludetestsfile
+ else
+ cat $e >> $excludetestsfile
+ fi
+ elif [[ -d "$e" ]]; then
+ find $e -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $excludetestsfile
+ fi
done
-case "$product" in
- firefox) testscript=$TEST_JSDIR/test-browser.sh;;
- js) testscript=$TEST_JSDIR/test-shell.sh;;
- *) echo "unknown product [$product]"
- exit 2
+# convert the numeric speed rating to a prose value
+if [[ $TEST_CPUSPEED -lt 4 ]]; then
+ TEST_CPUSPEED=slow
+elif [[ $TEST_CPUSPEED -lt 9 ]]; then
+ TEST_CPUSPEED=medium
+else
+ TEST_CPUSPEED=fast
+fi
+
+pattern="TEST_BRANCH=($branch|[.][*]), TEST_BUILDTYPE=($buildtype|[.][*]), TEST_TYPE=($testtype|[.][*]), TEST_OS=($OSID|[.][*]), TEST_KERNEL=($TEST_KERNEL|[.][*]), TEST_PROCESSORTYPE=($TEST_PROCESSORTYPE|[.][*]), TEST_MEMORY=($TEST_MEMORY|[.][*]), TEST_CPUSPEED=($TEST_CPUSPEED|[.][*]),"
+
+if [[ -z "$timeouts" ]]; then
+ echo "# exclude tests that time out" >> $excludetestsfile
+ echo "$pattern .*TEST_EXITSTATUS=TIMED OUT," >> $excludetestsfile
+ egrep "$pattern .*TEST_EXITSTATUS=TIMED OUT," failures.txt | \
+ sed 's/.*TEST_ID=\([^,]*\),.*/\1/' | sort -u >> $excludetestsfile
+fi
+
+if [[ -z "$crashes" ]]; then
+ echo "# exclude tests that crash" >> $excludetestsfile
+ echo "$pattern .*TEST_EXITSTATUS=(CRASHED|ABNORMAL)" >> $excludetestsfile
+ egrep "$pattern .*TEST_EXITSTATUS=(CRASHED|ABNORMAL)" failures.txt | \
+ sed 's/.*TEST_ID=\([^,]*\),.*/\1/' | sort -u >> $excludetestsfile
+
+fi
+
+cat $includetestsfile | sed 's|^|include: |'
+cat $excludetestsfile | sed 's|^|exclude: |'
+
+case $testtype in
+ shell)
+ echo "JavaScriptTest: Begin Run"
+ cat $includetestsfile | while read jsfile
+ do
+ if echo $jsfile | grep -q '^#'; then
+ continue
+ fi
+
+ if ! grep -q $jsfile $excludetestsfile; then
+
+ result=`echo $jsfile | sed 's/.*js\([0-9]\)_\([0-9]\).*/\1.\2/'`
+
+ case $result in
+ 1.5) version="150";;
+ 1.6) version="160";;
+ 1.7) version="170";;
+ 1.8) version="180";;
+ 1.9) version="190";;
+ 2.0) version="200";;
+ *) version="150";;
+ esac
+
+ subsuitetestdir=`dirname $jsfile`
+ suitetestdir=`dirname $subsuitetestdir`
+ echo "JavaScriptTest: Begin Test $jsfile"
+ if eval $TIMECOMMAND timed_run.py $TEST_JSEACH_TIMEOUT \"$jsfile\" \
+ $EXECUTABLE_DRIVER \
+ $executable -v $version \
+ -S 524288 \
+ $gczealshell \
+ -f ./shell.js \
+ -f $suitetestdir/shell.js \
+ -f $subsuitetestdir/shell.js \
+ -f ./$jsfile \
+ -f ./js-test-driver-end.js; then
+ true
+ else
+ rc=$?
+ fi
+ if [[ $rc == 99 ]]; then
+ error "User Interrupt"
+ fi
+ echo "JavaScriptTest: End Test $jsfile"
+ fi
+ done
+ echo "JavaScriptTest: End Run"
+ ;;
+
+ browser)
+ urllist="urllist-$branch-$testtype-$buildtype.tests"
+ urlhtml="urllist-$branch-$testtype-$buildtype.html"
+
+ rm -f $urllist $urlhtml
+
+ cat > $urlhtml <<EOF
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JavaScript Tests</title>
+</head>
+<body>
+<ul>
+EOF
+
+ cat $includetestsfile | while read jsfile
+ do
+ if echo $jsfile | grep -q '^#'; then
+ continue
+ fi
+
+ if ! grep -q $jsfile $excludetestsfile; then
+
+ result=`echo $jsfile | sed 's/.*js\([0-9]\)_\([0-9]\).*/\1.\2/'`
+
+ case $result in
+ 1.5) version=";version=1.5";;
+ 1.6) version=";version=1.6";;
+ 1.7) version=";version=1.7";;
+ 1.8) version=";version=1.8";;
+ 1.9) version=";version=1.9";;
+ 2.0) version=";version=2.0";;
+ *) version="";;
+ esac
+
+ echo "http://$TEST_HTTP/$TEST_WWW_JS/js-test-driver-standards.html?test=$jsfile;language=type;text/javascript$version$gczealbrowser" >> $urllist
+ echo "<li><a href='http://$TEST_HTTP/$TEST_WWW_JS/js-test-driver-standards.html?test=$jsfile;language=type;text/javascript$version$gczealbrowser'>$jsfile</a></li>" >> $urlhtml
+ fi
+ done
+
+ cat >> $urlhtml <<EOF
+</ul>
+</body>
+</html>
+EOF
+
+ chmod a+r $urlhtml
+
+ if [[ -z "$filesonly" ]]; then
+ echo "JavaScriptTest: Begin Run"
+ cat "$urllist" | while read url;
+ do
+ edit-talkback.sh -p "$product" -b "$branch" -x "$executablepath" -i "$url"
+ jsfile=`echo $url | sed "s|http://$TEST_HTTP/$TEST_WWW_JS/js-test-driver-standards.html?test=\([^;]*\);.*|\1|"`
+ echo "JavaScriptTest: Begin Test $jsfile"
+ if eval $TIMECOMMAND timed_run.py $TEST_JSEACH_TIMEOUT \"$jsfile\" \
+ $EXECUTABLE_DRIVER \
+ \"$executable\" -P \"$profilename\" \
+ -spider -start -quit \
+ -uri \"$url\" \
+ -depth 0 -timeout \"$TEST_JSEACH_PAGE_TIMEOUT\" \
+ -hook \"http://$TEST_HTTP/$TEST_WWW_JS/userhookeach.js\"; then
+ true
+ else
+ rc=$?
+ fi
+ if [[ $rc == 99 ]]; then
+ error "User Interrupt"
+ fi
+ echo "JavaScriptTest: End Test $jsfile"
+ done
+ echo "JavaScriptTest: End Run"
+ fi
+ ;;
+ *)
;;
esac
-$testscript -d "$datafiles" $gczeal
+popd
Index: universe.data
===================================================================
RCS file: universe.data
diff -N universe.data
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ universe.data 25 Jun 2008 17:31:17 -0000
@@ -0,0 +1,100 @@
+TEST_OS=darwin, TEST_KERNEL=8.11.0, TEST_PROCESSORTYPE=powerpc32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=8.11.0, TEST_PROCESSORTYPE=powerpc32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=8.11.0, TEST_PROCESSORTYPE=powerpc32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=8.11.0, TEST_PROCESSORTYPE=powerpc32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=8.11.0, TEST_PROCESSORTYPE=powerpc32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=8.11.0, TEST_PROCESSORTYPE=powerpc32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=8.11.0, TEST_PROCESSORTYPE=powerpc32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=8.11.0, TEST_PROCESSORTYPE=powerpc32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=8.11.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=8.11.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=8.11.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=8.11.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=1, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=darwin, TEST_KERNEL=9.3.0, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=medium, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=4, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=1, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=1, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=1, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=1, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=1, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=1, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=1, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=1, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=4, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=4, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=4, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=4, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=4, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=4, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=4, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.18, TEST_PROCESSORTYPE=intel64, TEST_MEMORY=4, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0700, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.25, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=3, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.25, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=3, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.25, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=3, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.25, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=3, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.25, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=3, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.25, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=3, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=linux, TEST_KERNEL=2.6.25, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=3, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=linux, TEST_KERNEL=2.6.25, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=3, TEST_CPUSPEED=slow, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=nt, TEST_KERNEL=5.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=nt, TEST_KERNEL=5.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=nt, TEST_KERNEL=5.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=nt, TEST_KERNEL=5.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.8.1, TEST_BUILDTYPE=opt, TEST_TYPE=shell
+TEST_OS=nt, TEST_KERNEL=5.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=browser
+TEST_OS=nt, TEST_KERNEL=5.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=debug, TEST_TYPE=shell
+TEST_OS=nt, TEST_KERNEL=5.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=browser
+TEST_OS=nt, TEST_KERNEL=5.1, TEST_PROCESSORTYPE=intel32, TEST_MEMORY=2, TEST_CPUSPEED=fast, TEST_TIMEZONE=-0400, TEST_BRANCH=1.9.0, TEST_BUILDTYPE=opt, TEST_TYPE=shell
Index: userhookeach.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/userhookeach.js,v
retrieving revision 1.4
diff -p -U 8 -r1.4 userhookeach.js
--- userhookeach.js 10 Apr 2008 20:54:08 -0000 1.4
+++ userhookeach.js 25 Jun 2008 17:31:18 -0000
@@ -49,17 +49,16 @@ var gCurrentTestValid;
var gPageStart;
var gPageStop;
function userOnStart()
{
try
{
dlog('userOnStart');
- cdump('JavaScriptTest: Begin Run');
registerDialogCloser();
}
catch(ex)
{
cdump('Spider: FATAL ERROR: userOnStart: ' + ex);
}
}
@@ -67,17 +66,16 @@ function userOnBeforePage()
{
try
{
dlog('userOnBeforePage');
gPageStart = new Date();
gCurrentTestId = /test=(.*);language/.exec(gSpider.mCurrentUrl.mUrl)[1];
gCurrentTestValid = true;
- cdump('JavaScriptTest: Begin Test ' + gCurrentTestId);
gCurrentTestStart = new Date();
}
catch(ex)
{
cdump('Spider: WARNING ERROR: userOnBeforePage: ' + ex);
gCurrentTestValid = false;
gPageCompleted = true;
}
@@ -85,46 +83,43 @@ function userOnBeforePage()
function userOnAfterPage()
{
try
{
dlog('userOnAfterPage');
gPageStop = new Date();
- cdump(gSpider.mCurrentUrl.mUrl + ': PAGE STATUS: NORMAL (' + ((gPageStop - gPageStart)/1000).toFixed(0) + ' seconds)');
checkTestCompleted();
}
catch(ex)
{
cdump('Spider: WARNING ERROR: userOnAfterPage: ' + ex);
gCurrentTestValid = false;
gPageCompleted = true;
}
}
function userOnStop()
{
try
{
// close any pending dialogs
- cdump('JavaScriptTest: End Run');
closeDialog();
unregisterDialogCloser();
}
catch(ex)
{
cdump('Spider: WARNING ERROR: userOnStop: ' + ex);
}
}
function userOnPageTimeout()
{
gPageStop = new Date();
- cdump(gSpider.mCurrentUrl.mUrl + ': PAGE STATUS: TIMED OUT (' + ((gPageStop - gPageStart)/1000).toFixed(0) + ' seconds)');
if (typeof gSpider.mDocument != 'undefined')
{
try
{
var win = gSpider.mDocument.defaultView;
if (win.wrappedJSObject)
{
win = win.wrappedJSObject;
@@ -132,17 +127,16 @@ function userOnPageTimeout()
gPageCompleted = win.gPageCompleted = true;
checkTestCompleted();
}
catch(ex)
{
cdump('Spider: WARNING ERROR: userOnPageTimeout: ' + ex);
}
}
- cdump('JavaScriptTest: End Test ' + gCurrentTestId);
}
function checkTestCompleted()
{
try
{
dlog('checkTestCompleted()');
@@ -176,17 +170,16 @@ function checkTestCompleted()
cdump('JavaScriptTest: ' + gCurrentTestId +
' gTestcases array is empty. Tests not run.');
new win.TestCase(win.gTestFile, win.summary, 'Unknown', 'gTestcases array is empty. Tests not run..');
}
else
{
}
cdump('JavaScriptTest: ' + gCurrentTestId + ' Elapsed time ' + ((gCurrentTestStop - gCurrentTestStart)/1000).toFixed(2) + ' seconds');
- cdump('JavaScriptTest: End Test ' + gCurrentTestId);
gPageCompleted = true;
}
else
{
dlog('page not completed, recheck');
setTimeout(checkTestCompleted, gCheckInterval);
}