JavaScript Tests - sync Sisyphus support, bug 398005, not part of the build

This commit is contained in:
bclary@bclary.com 2007-10-01 12:10:41 -07:00
parent 656dd5f434
commit 93b1d90cba
15 changed files with 2061 additions and 550 deletions

View File

@ -5,7 +5,7 @@ TEST_JS = $(shell find . -name '*.js' -print)
CURRDIR=$(shell pwd)
JSDIR=$(shell basename $(CURRDIR))
all: menu.html 1.8.0-list.txt 1.8.1-list.txt 1.9.0-list.txt menu-list.txt excluded-n.tests spidermonkey-extensions-n.tests
all: menu.html 1.8.0-list.txt 1.8.1-list.txt 1.9.0-list.txt menu-list.txt excluded-n.tests spidermonkey-extensions-n.tests failures.txt
menu.html: menuhead.html menufoot.html Makefile excluded-n.tests $(TEST_JS)
perl mklistpage.pl > menubody.html
@ -31,11 +31,11 @@ menu-list.txt:
cat 1.8.1-list.txt > 1.9.0-list.txt
./list.sh js1_8 | sort >> 1.9.0-list.txt
#e4x-list.txt: $(TEST_JS)
# ./list.sh e4x | sort > e4x-list.txt
confidential-failures.txt:
touch confidential-failures.txt
#lc2-list.txt: $(TEST_JS)
# ./list.sh lc2 | sort > lc2-list.txt
failures.txt: public-failures.txt confidential-failures.txt
cat public-failures.txt confidential-failures.txt | sort | uniq > failures.txt
ecma_3/RegExp/re_tests:
curl -LsS -m 1800 "http://www.cpan.org/src/stable.tar.bz2" -o stable.tar.bz2
@ -44,5 +44,5 @@ ecma_3/RegExp/re_tests:
rm -fR `find . -maxdepth 1 -name 'perl-*'` stable.tar.bz2
clean:
rm -f menubody.html menu.html *-list.txt excluded-n.tests
rm -f menubody.html menu.html *-list.txt excluded-n.tests failures.txt

View File

@ -1,155 +0,0 @@
# -*- Makefile -*-
# ***** 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 JavaScript Engine testing utilities.
#
# The Initial Developer of the Original Code is
# Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s): Bob Clary
#
# 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 *****
include config.mk
TEST_PROFILE?=TEST
TEST_HTTP ?= test.mozilla.com
ifndef TEST_JSBROWSER_TIMEOUT
TEST_JSBROWSER_TIMEOUT=900
endif
ifndef TEST_JSEACH_TIMEOUT
TEST_JSEACH_TIMEOUT=900
endif
ifndef TEST_JSSHELL_TIMEOUT
TEST_JSSHELL_TIMEOUT=900
endif
MACHINE := $(shell uname -n)
CURDIR := $(shell pwd)
LOGPATH = $(subst /www/tests/,/www/results/,$(CURDIR))
LOGFILE = $(LOGPATH)/$(TEST_DATE)-$(TEST_NAME)-$(TEST_BUILDID)-$(TEST_OPTDEBUG)-$(MACHINE)
JS_FILES=$(shell find . -mindepth 2 -name '*.js' -print | grep -v shell.js | grep -v browser.js | grep -v template.js | sort)
all: shell browser
shell: jsshell e4xshell
browser: jsbrowsereach e4xbrowsereach
browsereach: jsbrowsereach e4xbrowsereach
#
# shell based tests
#
jsshell:
-time perl jsDriver.pl \
-L e4x lc2 lc3 spidermonkey-n.tests \
-s $(TEST_JS_EXE) \
-e sm$(TEST_OPTDEBUG) \
-o '-S 524288' \
-K \
-T $(TEST_JSSHELL_TIMEOUT) \
-f $(LOGFILE)-js.html 2>&1 | sed 's/^/jsshell: /'
e4xshell:
-time perl jsDriver.pl \
-l e4x -L spidermonkey-n.tests \
-s $(TEST_JS_EXE) \
-o '-S 524288 -x' \
-e sm$(TEST_OPTDEBUG) \
-K \
-T $(TEST_JSSHELL_TIMEOUT) \
-f $(LOGFILE)-e4x.html 2>&1 | sed 's/^/e4xshell: /'
#
# browser based tests
#
jsbrowser: menu.html
-time $(TEST_BIN)/spider.pl --product=$(TEST_PRODUCT) --bin=$(TEST_BIN) \
--timeout=$(TEST_JSBROWSER_TIMEOUT) --exe=$(TEST_EXE) \
--profile=$(TEST_PROFILE) \
--hook=/tests/mozilla.org/js/userhook-js.js \
--urls=menu-list.txt --depth=0 --id=js 2>&1 | \
sed 's/^/jsbrowser: /'
e4xbrowser: menu.html
-time $(TEST_BIN)/spider.pl --product=$(TEST_PRODUCT) --bin=$(TEST_BIN) \
--timeout=$(TEST_JSBROWSER_TIMEOUT) --exe=$(TEST_EXE) \
--profile=$(TEST_PROFILE) \
--hook=/tests/mozilla.org/js/userhook-e4x.js \
--urls=menu-list.txt --depth=0 --id=e4x 2>&1 | \
sed 's/^/e4xbrowser: /'
jsbrowsereach: menu.html
-time $(TEST_BIN)/spider.pl --product=$(TEST_PRODUCT) --bin=$(TEST_BIN) \
--timeout=$(TEST_JSEACH_TIMEOUT) --exe=$(TEST_EXE) \
--profile=$(TEST_PROFILE) \
--hook=/tests/mozilla.org/js/userhookeach-js.js \
--urls=js-list.txt --depth=0 --id=js 2>&1 | \
sed 's/^/jsbrowsereach: /'
e4xbrowsereach: menu.html
-time $(TEST_BIN)/spider.pl --product=$(TEST_PRODUCT) --bin=$(TEST_BIN) \
--timeout=$(TEST_JSEACH_TIMEOUT) --exe=$(TEST_EXE) \
--profile=$(TEST_PROFILE) \
--hook=/tests/mozilla.org/js/userhookeach-e4x.js \
--urls=e4x-list.txt --depth=0 --id=e4x 2>&1 | \
sed 's/^/e4xbrowsereach: /'
menu.html: menuhead.html menufoot.html $(JS_FILES) Makefile
$(MAKE) -f Makefile
clean:
$(MAKE) -f Makefile clean
jsbrowsertesteach: menu.html
-time $(TEST_BIN)/spider.pl --product=$(TEST_PRODUCT) --bin=$(TEST_BIN) \
--timeout=$(TEST_JSEACH_TIMEOUT) --exe=$(TEST_EXE) \
--profile=$(TEST_PROFILE) \
--hook=/tests/mozilla.org/js/userhookeach-js.js \
--urls=test-list.txt --depth=0 --id=js 2>&1 | \
sed 's/^/jsbrowsereach: /'
jsshelltest:
-time perl jsDriver.pl \
-l js1_5/Regress/regress-343713.js \
-s $(TEST_JS_EXE) \
-e sm$(TEST_OPTDEBUG) \
-o '-S 524288' \
-K \
-T $(TEST_JSSHELL_TIMEOUT) \
-f $(LOGFILE)-js.html 2>&1 | sed 's/^/jsshell: /'

264
js/tests/create-patterns.pl Executable file
View File

@ -0,0 +1,264 @@
#!/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";
}
}

View File

@ -359,6 +359,14 @@ sub execute_tests {
"Actual exit $got_exit, signal $exit_signal",
join("\n",@output));
}
elsif ($got_exit != 0) {
# abnormal termination but the test passed, so output a summary line
&report_summary_result($test, $bug_number, "PASSED",
"",
"Expected exit $expected_exit",
"Actual exit $got_exit, signal $exit_signal",
join("\n",@output));
}
}
elsif ($timed_out) {
# test was terminated due to timeout
@ -1537,6 +1545,11 @@ sub report_summary_result
$actual =~ s/[\n\r]+/ /mg;
$reason =~ s/[\n\r]+/ /mg;
if ($result !~ /PASSED/)
{
$failures_reported++;
}
print STDERR ("jstest: $test " .
"bug: $bug_number " .
"result: $result " .

569
js/tests/known-failures.pl Executable file
View File

@ -0,0 +1,569 @@
#!/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 *****
use strict;
use Getopt::Mixed "nextOption";
# predeclarations
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 $branch;
my $buildtype;
my $testtype;
my $rawlogfile;
my $failurelogfile;
my $os;
my $patterns;
my $timezone;
my $outputprefix;
my $arch;
my $kernel;
my $debug = $ENV{DEBUG};
# pattern variables
my $knownfailurebranchpattern;
my $failurebranchpattern;
my $knownfailureospattern;
my $failureospattern;
my $knownfailurebuildtypepattern;
my $failurebuildtypepattern;
my $knownfailuretesttypepattern;
my $failuretesttypepattern;
my $knownfailuretimezonepattern;
my $failuretimezonepattern;
my $knownfailurearchpattern;
my $failurearchpattern;
my $knownfailurekernelpattern;
my $failurekernelpattern;
my @patterns;
my $pattern;
my @failures;
my @fixes;
my @excludedtests;
my $excludedtest;
my @results;
my $regchars = '\[\^\-\]\|\{\}\?\*\+\.\<\>\$\(\)';
my @excludedfiles = ('spidermonkey-n.tests', 'slow-n.tests', 'performance.tests');
my $excludedfile;
&parse_options;
my $jsdir = $ENV{TEST_JSDIR};
if (!defined($jsdir)) {
$jsdir = "/work/mozilla/mozilla.com/test.mozilla.com/www/tests/mozilla.org/js";
}
# create working patterns file consisting of matches to users selection
# and which has the test description patterns escaped
# remove the excluded tests from the possible fixes log
foreach $excludedfile ( @excludedfiles ) {
open EXCLUDED, "<$jsdir/$excludedfile" or die "Unable to open excluded file $jsdir/$excludedfile: $!\n";
while (<EXCLUDED>) {
chomp;
next if ($_ =~ /^\#/);
push @excludedtests, ($_);
}
close EXCLUDED;
}
@excludedtests = sort @excludedtests;
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";
open PATTERNS, "<$patterns" or die "Unable to open known failure patterns file $patterns: $!\n";
while (<PATTERNS>) {
chomp;
if ($_ =~ /^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,/) {
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,";
if (defined($rawlogfile)) {
$failurelogfile = "$outputprefix-results-failures.log";
my $alllog = "$outputprefix-results-all.log";
debug "writing failures $failurelogfile";
open INPUTLOG, "$jsdir/post-process-logs.pl $rawlogfile|sort|uniq|" or die "Unable to open $rawlogfile $!\n";
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,/) {
debug "failure: $_";
push @failures, ($_);
print FAILURELOG "$_\n";
}
}
close INPUTLOG;
close ALLLOG;
close FAILURELOG;
}
else {
debug "loading failures $failurelogfile";
open FAILURES, "<$failurelogfile" 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,/) {
debug "failure: $_";
push @failures, ($_);
}
}
close FAILURES;
}
debug "finding fixed bugs";
unlink "$outputprefix-results-possible-fixes.log";
foreach $pattern (@patterns) {
# look for known failure patterns that don't have matches in the
# the current failures selected by the user.
@results = grep m@^$pattern@, @failures;
if ($#results == -1) {
debug "fix: $pattern";
push @fixes, ($pattern)
}
}
foreach $excludedtest ( @excludedtests ) {
if ($debug) {
@results = grep m@$excludedtest@, @fixes;
if ($#results > -1) {
print "excluding: " . (join ', ', @results) . "\n";
}
}
@results = grep !m@$excludedtest@, @fixes;
@fixes = @results;
}
my $fix;
open OUTPUT, ">$outputprefix-results-possible-fixes.log" or die "Unable to open $outputprefix-results-possible-fixes.log: $!";
foreach $fix (@fixes) {
print OUTPUT unescape_pattern($fix) . "\n";
if ($debug) {
debug "fix: $fix";
}
}
close OUTPUT;
print STDOUT "$outputprefix-results-possible-fixes.log\n";
debug "finding regressions";
my $pass = 0;
my $changed = ($#patterns != -1);
while ($changed) {
$pass = $pass + 1;
$changed = 0;
debug "pass $pass";
foreach $pattern (@patterns) {
debug "Pattern: $pattern";
my @nomatches = grep !m@^$pattern@, @failures;
my @matches = grep m@^$pattern@, @failures;
if ($debug) {
my $temp = join ', ', @nomatches;
debug "nomatches: $#nomatches $temp";
$temp = join ', ', @matches;
debug "matches: $#matches $temp";
}
@failures = @nomatches;
if ($#matches > -1) {
$changed = 1;
}
debug "*****************************************";
}
}
foreach $excludedtest ( @excludedtests ) {
if ($debug) {
@results = grep m@$excludedtest@, @failures;
if ($#results > -1) {
print "excluding: " . (join ', ', @results) . "\n";
}
}
@results = grep !m@$excludedtest@, @failures;
@failures = @results;
}
open OUTPUT, ">$outputprefix-results-possible-regressions.log" or die "Unable to open $outputprefix-results-possible-regressions.log: $!";
my $failure;
foreach $failure (@failures) {
print OUTPUT "$failure\n";
if ($debug) {
debug "regression: $failure";
}
}
close OUTPUT;
print STDOUT "$outputprefix-results-possible-regressions.log\n";
sub debug {
if ($debug) {
my $msg = shift;
print "DEBUG: $msg\n";
}
}
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]
([-f|--failurelogfile] failurelogfile|[-l|--logfile] rawlogfile])
[-r|--patterns] patterns [-z|--timezone] timezone
[-O|--outputprefix] outputprefix
variable description
=============== ============================================================
-b branch branch 1.8.1, 1.9.0, all
-T buildtype build type opt, debug, all
-t testtype test type browser, shell, all
-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);
Getopt::Mixed::init ($option_desc);
$Getopt::Mixed::order = $Getopt::Mixed::RETURN_IN_ORDER;
while (($option, $value) = nextOption()) {
if ($option eq "b") {
$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 "z") {
$timezone = $value;
}
elsif ($option eq "O") {
$outputprefix = $value;
}
elsif ($option eq "A") {
$arch = $value;
}
elsif ($option eq "K") {
$kernel = $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";
}
Getopt::Mixed::cleanup();
if ( !defined($branch) ) {
usage "missing branch";
}
if (!defined($rawlogfile) && !defined($failurelogfile)) {
usage "missing logfile";
}
if (!defined($os)) {
usage "missing os";
}
if (!defined($buildtype)) {
usage "missing buildtype";
}
if (!defined($testtype)) {
usage "missing testtype";
}
if (!defined($patterns)) {
usage "missing patterns";
}
if (!defined($timezone)) {
usage "missing timezone";
}
if (!defined($outputprefix)) {
usage "missing outputprefix";
}
if ($branch eq "1.8.1") {
$knownfailurebranchpattern = "([^,]*1\\.8\\.1[^,]*|\\.\\*)";
$failurebranchpattern = "1\\.8\\.1";
}
elsif ($branch eq "1.9.0") {
$knownfailurebranchpattern = "([^,]*1\\.9\\.0[^,]*|\\.\\*)";
$failurebranchpattern = "1\\.9\\.0";
}
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[^,]*|\\.\\*)";
$failurebuildtypepattern = "opt";
}
elsif ($buildtype eq "debug") {
$knownfailurebuildtypepattern = "([^,]*debug[^,]*|\\.\\*)";
$failurebuildtypepattern = "debug";
}
elsif ($buildtype eq "all") {
$knownfailurebuildtypepattern = "[^,]*";
$failurebuildtypepattern = "[^,]*";
}
if ($testtype eq "shell") {
$knownfailuretesttypepattern = "([^,]*shell[^,]*|\\.\\*)";
$failuretesttypepattern = "shell";
}
elsif ($testtype eq "browser") {
$knownfailuretesttypepattern = "([^,]*browser[^,]*|\\.\\*)";
$failuretesttypepattern = "browser";
}
elsif ($testtype eq "all") {
$knownfailuretesttypepattern = "[^,]*";
$failuretesttypepattern = "[^,]*";
}
if ($timezone eq "all") {
$knownfailuretimezonepattern = "[^,]*";
$failuretimezonepattern = "[^,]*";
}
else {
$knownfailuretimezonepattern = "([^,]*" . $timezone . "[^,]*|\\.\\*)";
$failuretimezonepattern = "$timezone";
}
if ($arch ne "all") {
$knownfailurearchpattern = "([^,]*" . $arch . "[^,]*|\\.\\*)";
$failurearchpattern = "$arch";
}
else {
$knownfailurearchpattern = "[^,]*";
$failurearchpattern = "[^,]*";
}
if ($kernel ne "all") {
$knownfailurekernelpattern = "([^,]*" . $kernel . "[^,]*|\\.\\*)";
$failurekernelpattern = "$kernel";
}
else {
$knownfailurekernelpattern = "[^,]*";
$failurekernelpattern = "[^,]*";
}
}
sub escape_pattern {
my $line = shift;
chomp;
my ($leading, $trailing) = $line =~ /(.*TEST_DESCRIPTION=)(.*)/;
# debug "escape_pattern: before: $leading$trailing";
# 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
$trailing =~ s/\\/\\\\/g;
# escape non word chars that aren't surrounded by ``
$trailing =~ s/(?<!`)([$regchars])(?!`)/\\$1/g;
$trailing =~ s/(?<!`)([$regchars])(?=`)/\\$1/g;
$trailing =~ s/(?<=`)([$regchars])(?!`)/\\$1/g;
# $trailing =~ s/(?<!`)(\W)(?!`)/\\$1/g;
# unquote the regchars
$trailing =~ s/\`([^\`])\`/$1/g;
debug "escape_pattern: after: $leading$trailing";
return "$leading$trailing";
}
sub unescape_pattern {
my $line = shift;
chomp;
my ($leading, $trailing) = $line =~ /(.*TEST_DESCRIPTION=)(.*)/;
# quote the unescaped non word chars
$trailing =~ s/(?<!\\)([$regchars])/`$1`/g;
# unescape the escaped non word chars
$trailing =~ s/\\([$regchars])/$1/g;
$trailing =~ s/\\\\/\\/g;
debug "unescape_pattern: after: $leading$trailing";
return "$leading$trailing";
}
####
1;

389
js/tests/post-process-logs.pl Executable file
View File

@ -0,0 +1,389 @@
#!/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) 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 *****
use Getopt::Mixed "nextOption";
use File::Temp qw/ tempfile tempdir /;
use File::Basename;
sub dbg;
sub outresults;
sub outputrecord;
local $file;
local $temp;
local $DEBUG = 0;
(undef, $temp) = tempfile();
open TEMP, ">$temp" or
die "Unable to open temporary file $temp for writing: $!\n";
local ($test_id, $test_bug, $test_result, $test_type,
$test_description, $in_browser_test, @messages,
$test_processortype, $test_kernel, $test_suite,
$last_test);
local $count_begintests = 0;
local $count_jstests = 0;
local $count_exitonlytestsnormal = 0;
local $count_exitonlytestsabnormal = 0;
local $count_records = 0;
while ($file = shift @ARGV)
{
dbg "initializing in_browser_test, messages";
$in_browser_test = 0;
@messages = ();
dbg "file: $file";
my $filename = basename $file;
dbg "filename: $file";
local ($test_date, $test_product, $test_branchid, $test_buildtype,
$test_os,
$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/;
# dbg "test_date: $test_date";
# dbg "test_timezone: $test_timezone";
# dbg "test_product: $test_product";
# dbg "test_branchid: $test_branchid";
# dbg "test_buildtype: $test_buildtype";
# dbg "test_os: $test_os";
# dbg "test_machine: $test_machine";
# dbg "test_suite: $test_suite";
open FILE, "$file" or die "unable to open $file for reading: $!\n";
if ($test_product eq "js")
{
while (<FILE>)
{
chomp;
dbg "INPUT: $_";
$_ =~ s/[\r]$//;
$_ =~ s/[\r]/CR/g;
$_ =~ s/[\x01-\x08]//g;
$_ =~ s/\s+$//;
if ( $_ =~ /^jstest: /)
{
++$count_jstests;
($test_id) = $_ =~ /^jstest: (.*?) *bug:/;
($test_bug) = $_ =~ /bug: (.*?) *result:/;
($test_result) = $_ =~ /result: (.*?) *type:/;
($test_type) = $_ =~ /type: (.*?) *description:/;
($test_description) = $_ =~ /description: (.*)/;
if (!$test_description)
{
$test_description = "";
}
dbg "test_id: $test_id";
dbg "test_bug: $test_bug";
dbg "test_result: $test_result";
dbg "test_type: $test_type";
dbg "test_description: $test_description";
outputrecord;
dbg "-";
}
elsif (($envvar, $envval) = $_ =~ /^environment: (TEST_[A-Z0-9_]*)=(.*)/ )
{
dbg "envvar=$envvar, envval=$envval";
$envvar =~ tr/A-Z/a-z/;
$$envvar = $envval;
dbg $envvar . "=" . $$envvar;
}
elsif (($envval) = $_ =~ /^environment: OSID=(.*)/ )
{
$test_os = $envval;
}
}
}
elsif ($test_product eq "firefox")
{
$test_id = "__UNDEFINED__";
$test_bug = "__UNDEFINED__";
$test_result = "__UNDEFINED__";
$test_type = "__UNDEFINED__";
$test_description = "__UNDEFINED__";
$last_test = "__UNDEFINED__";
$in_browser_test = 0;
@messages = ();
while (<FILE>)
{
chomp;
# remove carriage returns, bels and other annoyances.
$_ =~ s/[\r]$//;
$_ =~ s/[\r]/CR/g;
$_ =~ s/[\x01-\x08]//g;
$_ =~ s/\s+$//;
dbg "INPUT: $_";
if ( $_ =~ /^jstest: /)
{
++$count_jstests;
($test_id) = $_ =~ /^jstest: (.*?) *bug:/;
($test_bug) = $_ =~ /bug: (.*?) *result:/;
($test_result) = $_ =~ /result: (.*?) *type:/;
($test_type) = $_ =~ /type: (.*?) *description:/;
($test_description) = $_ =~ /description: (.*)/;
if (!$test_description)
{
$test_description = "";
}
dbg "test_id: $test_id";
dbg "test_bug: $test_bug";
dbg "test_result: $test_result";
dbg "test_type: $test_type";
dbg "test_description: $test_description";
dbg "test_result: $test_result";
outputrecord;
}
elsif ( ($test_id, $exit_status) = $_ =~
/^http:.*test=([^;]*);.*: EXIT STATUS: (.*)/)
{
dbg "Processing EXIT STATUS: test_id: $test_id, exit_status: $exit_status";
$test_buildtype = "nightly" unless $test_buildtype;
$test_type = "browser";
if ($exit_status =~ /^NORMAL/)
{
if ($last_test ne $test_id)
{
++$count_exitonlytestsnormal;
$test_description = join '; ', @messages;
if ($test_description =~ /(out of memory|malloc:.*vm_allocate)/i)
{
$test_result = "FAILED";
}
else
{
$test_result = "FAILED";
}
# if we got here, the test terminated but it
# didn't report a result either because it
# crashed or the harness messed up.
outputrecord;
}
}
else
{
++$count_exitonlytestsabnormal;
dbg "Abnormal result";
dbg "creating test_description from messages array";
$test_description = join '; ', @messages;
# if we got here, the test terminated but it
# didn't report a result either because it is one
# of the old style -n.js negative tests, it
# crashed or the harness messed up.
if ($test_id =~ /-n.js$/ && $test_description =~
/JavaScript (Exception|Error)/i)
{
# force -n.js tests which pass if they end
# with an error or exception to 'pass'
$test_result = "PASSED";
}
else
{
$test_result = "FAILED";
$test_description = "EXIT STATUS: $exit_status, $test_description";
}
outputrecord;
}
$in_browser_test = 0;
@messages = ();
dbg "not in browser test";
dbg "--";
}
elsif ( ($test_id) =
$_ =~ /Begin loading .*http.*test=([^;]*).*/)
{
dbg "Begin loading $test_id";
$in_browser_test = 1;
++$count_begintests;
}
elsif ( ($test_id) =
$_ =~ /Finish loading .*http.*test=([^;]*).*/)
{
dbg "Finish loading $test_id";
if ($test_id eq "__UNDEFINED__")
{
$test_id = $test_id;
}
dbg "test_id: $test_id, test_id: $test_id";
die if ($test_id ne $test_id);
}
elsif ($in_browser_test)
{
if (! /^[-+]{2,2}(WEBSHELL|DOMWINDOW)/ && ! /^Spider:/ && ! /^JavaScriptTest:/ && !/^WARNING:/)
{
dbg "Saving message $_";
push @messages, ($_);
}
}
elsif (($envvar, $envval) = $_ =~ /^environment: (TEST_[A-Z0-9_]*)=(.*)/ )
{
dbg "envvar=$envvar, envval=$envval";
$envvar =~ tr/A-Z/a-z/;
$$envvar = $envval;
dbg $envvar . "=" . $$envvar;
}
elsif (($envval) = $_ =~ /^environment: OSID=(.*)/ )
{
$test_os = $envval;
}
}
}
close FILE;
undef $test_branchid;
undef $test_date;
undef $test_buildtype;
undef $test_machine;
undef $test_product;
undef $test_suite;
}
close TEMP;
outresults;
unlink $temp;
if ($DEBUG)
{
print "begintests $count_begintests\n";
print "jstests $count_jstests\n";
print "exit normal $count_exitonlytestsnormal\n";
print "exit abnormal $count_exitonlytestsabnormal\n";
print "total records $count_records\n";
print "jstests + exit normal + exit abnormal = " . ($count_jstests + $count_exitonlytestsnormal + $count_exitonlytestsabnormal) . "\n";
}
die "test counts do not match: total records $count_records; jstests + exit normal + exit abnormal = " .
($count_jstests + $count_exitonlytestsnormal + $count_exitonlytestsabnormal) . "\n"
if ($count_records != ($count_jstests + $count_exitonlytestsnormal + $count_exitonlytestsabnormal));
sub dbg {
if ($DEBUG)
{
my $msg = shift;
print STDOUT "DEBUG: $msg\n";
}
}
sub outresults
{
system("sort < $temp | uniq");
}
sub outputrecord
{
++$count_records;
# 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);
}
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";
if ($DEBUG)
{
print "RECORD: $output";
}
print TEMP $output;
$last_test = $test_id;
$test_id = "__UNDEFINED__";
$test_bug = "__UNDEFINED__";
$test_result = "__UNDEFINED__";
$test_type = "__UNDEFINED__";
$test_description = "__UNDEFINED__";
}

File diff suppressed because one or more lines are too long

197
js/tests/runtests.sh Executable file
View File

@ -0,0 +1,197 @@
#!/usr/local/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 *****
TEST_DIR=${TEST_DIR:-/work/mozilla/mozilla.com/test.mozilla.com/www}
TEST_BIN=${TEST_BIN:-$TEST_DIR/bin}
TEST_JSDIR=${TEST_JSDIR:-$TEST_DIR/tests/mozilla.org/js}
if [[ ! -e $TEST_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 ""
fi
if [[ ! -e $TEST_JSDIR/runtests.sh ]]; then
echo "TEST_JSDIR=$TEST_JSDIR"
echo ""
echo "If the TEST_JSDIR environment variable is not set, this script "
echo "assumes the JavaScript Tests live in \${TEST_DIR}/www/tests/mozilla.org/js"
echo "If this is not correct, please set the TEST_JSDIR environment variable"
echo "to point to the directory containing the JavaScript Test Library."
echo ""
fi
if [[ ! -e $TEST_BIN/library.sh || ! -e $TEST_JSDIR/runtests.sh ]]; then
exit 2
fi
source ${TEST_BIN}/library.sh
usage()
{
cat <<EOF
usage: runtests.sh -p products -b branches -T buildtypes -B buildcommands [-e extra]
usage: runtests.sh -p "$products" -b "$branches" -T "$buildtypes" -B "$buildcommands" -e "$extra"
variable description
=============== ============================================================
-p products space separated list of js, firefox
-b branches space separated list of branches 1.8.1, 1.9.0
-T buildtypes space separated list of build types opt debug
-e extra optional. extra qualifier to pick build tree and mozconfig.
-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'.
if an argument contains more than one value, it must be quoted.
EOF
exit 2
}
while getopts "p:b:T:B:e:" optname;
do
case $optname in
p) products=$OPTARG;;
b) branches=$OPTARG;;
T) buildtypes=$OPTARG;;
e) extra="$OPTARG"
extraflag="-e $OPTARG";;
B) buildcommands=$OPTARG;;
esac
done
if [[ -z "$products" || -z "$branches" || -z "$buildtypes" ]]; then
usage
fi
if [[ -z "$buildcommands" ]]; then
buildcommands="clean checkout build"
fi
case $buildtypes in
nightly)
buildtypes="nightly-$OSID"
;;
opt|debug|opt*debug)
if [[ -n "$buildcommands" ]]; then
builder.sh -p "$products" -b "$branches" $extraflag -B "$buildcommands" -T "$buildtypes"
fi
;;
esac
testlogfilelist=`mktemp /tmp/TESTLOGFILES.XXXX`
export testlogfiles
export testlogfile
if [[ -z "$extra" ]]; then
if tester.sh -t $TEST_JSDIR/test.sh "$products" "$branches" "$buildtypes" | tee -a $testlogfilelist; then
testlogfiles="`cat $testlogfilelist`"
fi
else
if tester.sh -t $TEST_JSDIR/test.sh "$products" "$branches" "$extra" "$buildtypes" | tee -a $testlogfilelist; then
testlogfiles="`cat $testlogfilelist`"
fi
fi
rm $testlogfilelist
case "$OSID" in
win32)
arch=all
kernel=all
;;
linux)
arch="`uname -p`"
kernel="`uname -r`"
case "$kernel" in
*el5PAE)
kernel='.*el5PAE'
;;
*ELsmp)
kernel='.*ELsmp'
;;
*fc*)
kernel='.*fc.'
;;
*)
kernel='[.][*]'
;;
esac
;;
mac)
arch="`uname -p`"
kernel=all
;;
*)
error "$OSID not supported"
;;
esac
for testlogfile in $testlogfiles; do
case "$testlogfile" in
*,js,*) testtype=shell;;
*,firefox,*) testtype=browser;;
*) error "unknown testtype in logfile $testlogfile";;
esac
case "$testlogfile" in
*,opt,*) buildtype=opt;;
*,debug,*) buildtype=debug;;
*) error "unknown buildtype in logfile $testlogfile";;
esac
case "$testlogfile" in
*,1.8.1,*) branch=1.8.1;;
*,1.9.0,*) branch=1.9.0;;
*) error "unknown branch in logfile $testlogfile";;
esac
outputprefix=$testlogfile
if [[ -n "$DEBUG" ]]; then
dumpvars branch buildtype testtype OSID testlogfile arch kernel outputprefix
fi
$TEST_DIR/tests/mozilla.org/js/known-failures.pl -b $branch -T $buildtype -t $testtype -o "$OSID" -z `date +%z` -l $testlogfile -A "$arch" -K "$kernel" -r $TEST_JSDIR/failures.txt -O $outputprefix
done

View File

@ -1,14 +1,74 @@
#!/usr/local/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) 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 *****
TEST_DIR=${TEST_DIR:-/work/mozilla/mozilla.com/test.mozilla.com/www}
TEST_BIN=${TEST_BIN:-$TEST_DIR/bin}
source ${TEST_BIN}/library.sh
TEST_JSDIR=${TEST_JSDIR:-$TEST_DIR/tests/mozilla.org/js}
TEST_JSEACH_TIMEOUT=${TEST_JSEACH_TIMEOUT:-240}
TEST_JSEACH_PAGE_TIMEOUT=${TEST_JSEACH_PAGE_TIMEOUT:-240}
if [[ ! -e $TEST_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 ""
fi
if [[ ! -e $TEST_JSDIR/runtests.sh ]]; then
echo "TEST_JSDIR=$TEST_JSDIR"
echo ""
echo "If the TEST_JSDIR environment variable is not set, this script "
echo "assumes the JavaScript Tests live in \${TEST_DIR}/www/tests/mozilla.org/js"
echo "If this is not correct, please set the TEST_JSDIR environment variable"
echo "to point to the directory containing the JavaScript Test Library."
echo ""
fi
if [[ ! -e $TEST_BIN/library.sh || ! -e $TEST_JSDIR/runtests.sh ]]; then
exit 2
fi
source ${TEST_BIN}/library.sh
TEST_JSEACH_TIMEOUT=${TEST_JSEACH_TIMEOUT:-900}
TEST_JSEACH_PAGE_TIMEOUT=${TEST_JSEACH_PAGE_TIMEOUT:-900}
TEST_WWW_JS=`echo $TEST_JSDIR|sed "s|$TEST_DIR||"`
#
@ -78,6 +138,8 @@ esac
pushd $TEST_JSDIR
# clock skew causes failures. clean first
make clean
make
cat "$list" | while read url; do

View File

@ -1,13 +1,73 @@
#!/usr/local/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) 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 *****
TEST_DIR=${TEST_DIR:-/work/mozilla/mozilla.com/test.mozilla.com/www}
TEST_BIN=${TEST_BIN:-$TEST_DIR/bin}
source ${TEST_BIN}/library.sh
TEST_JSDIR=${TEST_JSDIR:-$TEST_DIR/tests/mozilla.org/js}
TEST_JSSHELL_TIMEOUT=${TEST_JSSHELL_TIMEOUT:-240}
if [[ ! -e $TEST_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 ""
fi
if [[ ! -e $TEST_JSDIR/runtests.sh ]]; then
echo "TEST_JSDIR=$TEST_JSDIR"
echo ""
echo "If the TEST_JSDIR environment variable is not set, this script "
echo "assumes the JavaScript Tests live in \${TEST_DIR}/www/tests/mozilla.org/js"
echo "If this is not correct, please set the TEST_JSDIR environment variable"
echo "to point to the directory containing the JavaScript Test Library."
echo ""
fi
if [[ ! -e $TEST_BIN/library.sh || ! -e $TEST_JSDIR/runtests.sh ]]; then
exit 2
fi
source ${TEST_BIN}/library.sh
TEST_JSSHELL_TIMEOUT=${TEST_JSSHELL_TIMEOUT:-900}
#
# options processing
@ -72,6 +132,8 @@ esac
TEST_HTML_LOG="${TEST_DIR}/results/mozilla.org/js/${TEST_DATE},js,$branch,$buildtype,$OSID,${TEST_MACHINE},$TEST_SUITE-shell.html"
# clock skew causes failures. clean first
make clean
make
time perl jsDriver.pl \

View File

@ -1,12 +1,72 @@
#!/usr/local/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) 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 *****
TEST_DIR=${TEST_DIR:-/work/mozilla/mozilla.com/test.mozilla.com/www}
TEST_BIN=${TEST_BIN:-$TEST_DIR/bin}
source ${TEST_BIN}/library.sh
TEST_JSDIR=${TEST_JSDIR:-$TEST_DIR/tests/mozilla.org/js}
if [[ ! -e $TEST_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 ""
fi
if [[ ! -e $TEST_JSDIR/runtests.sh ]]; then
echo "TEST_JSDIR=$TEST_JSDIR"
echo ""
echo "If the TEST_JSDIR environment variable is not set, this script "
echo "assumes the JavaScript Tests live in \${TEST_DIR}/www/tests/mozilla.org/js"
echo "If this is not correct, please set the TEST_JSDIR environment variable"
echo "to point to the directory containing the JavaScript Test Library."
echo ""
fi
if [[ ! -e $TEST_BIN/library.sh || ! -e $TEST_JSDIR/runtests.sh ]]; then
exit 2
fi
source ${TEST_BIN}/library.sh
#
# options processing
#

View File

@ -1,119 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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 JavaScript Engine testing utilities.
*
* The Initial Developer of the Original Code is
* Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Bob Clary
*
* 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 ***** */
/*
* Spider hook function to execute e4x browser based JS tests.
*/
var gCheckInterval = 1000;
// if jsUnit status doesn't change, force page complete.
function userOnStart()
{
registerDialogCloser();
}
function userOnBeforePage()
{
dlog('userOnBeforePage');
}
var gReport;
function userOnAfterPage()
{
dlog('userOnAfterPage');
var win = gSpider.mDocument.defaultView;
if (win.wrappedJSObject)
{
win = win.wrappedJSObject;
}
win.__Report = win.reportHTML;
win.reportHTML = function () { win.__Report(); gPageCompleted = true; };
win.reportCallBack = function (testwin)
{
if (testwin.wrappedJSObject)
{
testwin = testwin.wrappedJSObject;
}
var gTestcases = testwin.gTestcases;
if (typeof gTestcases == 'undefined')
{
return;
}
for (var i = 0; i < gTestcases.length; i++)
{
var testcase = gTestcases[i];
cdump('test: ' + testcase.path + ' ' +
'bug: ' + testcase.bugnumber + ' ' +
'result: ' + (testcase.passed ? 'PASSED':'FAILED') + ' ' +
'type: browser ' +
'description: ' + testcase.description + ' ' +
'expected: ' + testcase.expect + ' ' +
'actual: ' + testcase.actual + ' ' +
'reason: ' + testcase.reason);
}
};
// only report failures
win.document.forms.testCases.failures.checked = true;
// use standards mode
win.document.forms.testCases.doctype.value = "standards";
// these calls are all async
win.selectAll('e4x');
// so need to delay this call to make
// sure the previous ones have completed
win.setTimeout("executeList()", 10000);
}
function userOnStop()
{
// close any pending dialogs
closeDialog();
unregisterDialogCloser();
}
gConsoleListener.onConsoleMessage =
function userOnConsoleMessage(s)
{
dump(s);
};

View File

@ -1,127 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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 JavaScript Engine testing utilities.
*
* The Initial Developer of the Original Code is
* Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Bob Clary
*
* 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 ***** */
/*
* Spider hook function to execute ecma*, js* browser based JS tests.
*/
var gCheckInterval = 1000;
// if jsUnit status doesn't change, force page complete.
function userOnStart()
{
registerDialogCloser();
}
function userOnBeforePage()
{
dlog('userOnBeforePage');
}
function userOnStop()
{
// close any pending dialogs
closeDialog();
unregisterDialogCloser();
}
var gReport;
function userOnAfterPage()
{
dlog('userOnAfterPage');
var win = gSpider.mDocument.defaultView;
if (win.wrappedJSObject)
{
win = win.wrappedJSObject;
}
win.__Report = win.reportHTML;
win.reportHTML = function () { win.__Report(); gPageCompleted = true; };
win.reportCallBack = function (testwin)
{
if (testwin.wrappedJSObject)
{
testwin = testwin.wrappedJSObject;
}
var gTestcases = testwin.gTestcases;
if (typeof gTestcases == 'undefined')
{
return;
}
for (var i = 0; i < gTestcases.length; i++)
{
var testcase = gTestcases[i];
cdump('test: ' + testcase.path + ' ' +
'bug: ' + testcase.bugnumber + ' ' +
'result: ' + (testcase.passed ? 'PASSED':'FAILED') + ' ' +
'type: browser ' +
'description: ' + testcase.description + ' ' +
'expected: ' + testcase.expect + ' ' +
'actual: ' + testcase.actual + ' ' +
'reason: ' + testcase.reason);
}
};
// only report failures
win.document.forms.testCases.failures.checked = true;
// use standards mode
win.document.forms.testCases.doctype.value = "standards";
// these calls are all async
win.selectAll('ecma');
win.selectAll('ecma_2');
win.selectAll('ecma_3');
win.selectAll('js1_1');
win.selectAll('js1_2');
win.selectAll('js1_3');
win.selectAll('js1_4');
win.selectAll('js1_5');
win.selectAll('js1_6');
// so need to delay this call to make
// sure the previous ones have completed
win.setTimeout("executeList()", 10000);
}
gConsoleListener.onConsoleMessage =
function userOnConsoleMessage(s)
{
dump(s);
};

View File

@ -1,116 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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 JavaScript Engine testing utilities.
*
* The Initial Developer of the Original Code is
* Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Bob Clary
*
* 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 ***** */
/*
* Spider hook function to check if an individual browser based JS test
* has completed executing.
*/
var gCheckInterval = 1000;
// if jsUnit status doesn't change, force page complete.
function userOnStart()
{
registerDialogCloser();
}
function userOnBeforePage()
{
dlog('userOnBeforePage');
}
var gReport;
function userOnAfterPage()
{
dlog('userOnAfterPage');
checkTestCompleted();
}
function userOnStop()
{
// close any pending dialogs
closeDialog();
unregisterDialogCloser();
}
function checkTestCompleted()
{
var win = gSpider.mDocument.defaultView;
if (win.wrappedJSObject)
{
win = win.wrappedJSObject;
}
if (win.gPageCompleted)
{
gPageCompleted = true;
var gTestcases = win.gTestcases;
if (typeof gTestcases == 'undefined')
{
return;
}
for (var i = 0; i < gTestcases.length; i++)
{
var testcase = gTestcases[i];
cdump('test: ' + testcase.path + ' ' +
'bug: ' + testcase.bugnumber + ' ' +
'result: ' + (testcase.passed ? 'PASSED':'FAILED') + ' ' +
'type: browser ' +
'description: ' + testcase.description + ' ' +
'expected: ' + testcase.expect + ' ' +
'actual: ' + testcase.actual + ' ' +
'reason: ' + testcase.reason);
}
// added in Spider 0.0.1.8
// gc to flush out issues quickly
collectGarbage();
}
else
{
dlog('page not completed, recheck');
setTimeout(checkTestCompleted, gCheckInterval);
}
}
gConsoleListener.onConsoleMessage =
function userOnConsoleMessage(s)
{
dump(s);
};

View File

@ -40,38 +40,43 @@
* has completed executing.
*/
var gCheckInterval = 1000;
// if jsUnit status doesn't change, force page complete.
var gCurrentTestId;
var gReport;
function userOnStart()
{
dlog('userOnStart');
registerDialogCloser();
}
function userOnBeforePage()
{
dlog('userOnBeforePage');
gCurrentTestId = /test=(.*);language/.exec(gSpider.mCurrentUrl.mUrl)[1];
cdump('JavaScriptTest: Begin Test ' + gCurrentTestId);
cdump('JavaScriptTest: Begin Execution ' + gCurrentTestId);
}
var gReport;
function userOnAfterPage()
{
dlog('userOnAfterPage');
cdump('JavaScriptTest: End Execution ' + gCurrentTestId);
checkTestCompleted();
}
function userOnStop()
{
// close any pending dialogs
cdump('JavaScriptTest: End Test ' + gCurrentTestId);
closeDialog();
unregisterDialogCloser();
}
function checkTestCompleted()
{
dlog('checkTestCompleted()');
var win = gSpider.mDocument.defaultView;
if (win.wrappedJSObject)
{
@ -79,27 +84,28 @@ function checkTestCompleted()
}
if (win.gPageCompleted)
{
unregisterDialogCloser();
dlog('Page Completed');
cdump('JavaScriptTest: Begin Summary ' + gCurrentTestId);
gPageCompleted = true;
var gTestcases = win.gTestcases;
if (typeof gTestcases == 'undefined')
{
return;
cdump('JavaScriptTest: ' + gCurrentTestId +
' gTestcases array not defined. Possible test failure.');
}
for (var i = 0; i < gTestcases.length; i++)
else if (gTestcases.length == 0)
{
var testcase = gTestcases[i];
cdump('test: ' + testcase.path + ' ' +
'bug: ' + testcase.bugnumber + ' ' +
'result: ' + (testcase.passed ? 'PASSED':'FAILED') + ' ' +
'type: browser ' +
'description: ' + testcase.description + ' ' +
'expected: ' + testcase.expect + ' ' +
'actual: ' + testcase.actual + ' ' +
'reason: ' + testcase.reason);
cdump('JavaScriptTest: ' + gCurrentTestId +
' gTestcases array is empty. Tests not run.');
}
else
{
}
cdump('JavaScriptTest: End Summary ' + gCurrentTestId);
// added in Spider 0.0.1.8
// gc to flush out issues quickly
collectGarbage();