Sisyphus/JavaScript - update to support 1.9.1, bug 441875

This commit is contained in:
bclary%bclary.com 2008-06-25 22:10:11 +00:00
Родитель 3a678ec000
Коммит e3c8bd4cad
20 изменённых файлов: 2589 добавлений и 1360 удалений

Просмотреть файл

@ -1,2 +1,26 @@
menu.html
menubody.html
excluded-1.8.1-browser-debug.tests
excluded-1.8.1-browser-opt.tests
excluded-1.8.1-shell-debug.tests
excluded-1.8.1-shell-opt.tests
excluded-1.9.0-browser-debug.tests
excluded-1.9.0-browser-opt.tests
excluded-1.9.0-shell-debug.tests
excluded-1.9.0-shell-opt.tests
included-1.8.1-browser-debug.tests
included-1.8.1-browser-opt.tests
included-1.8.1-shell-debug.tests
included-1.8.1-shell-opt.tests
included-1.9.0-browser-debug.tests
included-1.9.0-browser-opt.tests
included-1.9.0-shell-debug.tests
included-1.9.0-shell-opt.tests
urllist-1.8.1-browser-debug.html
urllist-1.8.1-browser-debug.tests
urllist-1.8.1-browser-opt.html
urllist-1.8.1-browser-opt.tests
urllist-1.9.0-browser-debug.html
urllist-1.9.0-browser-debug.tests
urllist-1.9.0-browser-opt.html
urllist-1.9.0-browser-opt.tests

Просмотреть файл

@ -22,16 +22,14 @@ 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
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 excluded-*.tests included-*.tests urllist*.html urllist*.tests
rm -f menubody.html menu.html menu-list.txt failures.txt *failures.txt.expanded excluded-*.tests included-*.tests urllist*.html urllist*.tests

223
js/tests/Patterns.pm Normal file
Просмотреть файл

@ -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;

120
js/tests/changes.sh Executable file
Просмотреть файл

@ -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

Просмотреть файл

48
js/tests/get-universe.sh Executable file
Просмотреть файл

@ -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

Просмотреть файл

@ -49,7 +49,7 @@ 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;
@ -63,6 +63,8 @@ my $timezone;
my $outputprefix;
my $arch;
my $kernel;
my $memory;
my $cpuspeed;
my $debug = $ENV{DEBUG};
# pattern variables
@ -81,6 +83,10 @@ my $knownfailurearchpattern;
my $failurearchpattern;
my $knownfailurekernelpattern;
my $failurekernelpattern;
my $knownfailurememorypattern;
my $failurememorypattern;
my $knownfailurecpuspeedpattern;
my $failurecpuspeedpattern;
my @patterns;
my $pattern;
@ -144,7 +150,7 @@ foreach $includedfile ( @includedfiles ) {
}
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>) {
@ -158,7 +164,7 @@ while (<PATTERNS>) {
{
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($_));
}
@ -171,7 +177,7 @@ 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)) {
@ -189,7 +195,7 @@ if (defined($rawlogfile)) {
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";
@ -201,17 +207,31 @@ if (defined($rawlogfile)) {
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, ($_);
}
@ -343,25 +363,35 @@ sub usage {
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
@ -385,30 +415,48 @@ sub parse_options {
elsif ($option eq "t") {
$testtype = $value;
}
elsif ($option eq "o") {
$os = $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 "r") {
$patterns = $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;
}
@ -416,7 +464,7 @@ sub parse_options {
}
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();
@ -424,15 +472,6 @@ sub parse_options {
usage "missing branch";
}
if (!defined($rawlogfile) && !defined($failurelogfile)) {
usage "missing logfile";
}
if (!defined($os)) {
usage "missing os";
}
if (!defined($buildtype)) {
usage "missing buildtype";
}
@ -441,60 +480,61 @@ sub parse_options {
usage "missing testtype";
}
if (!defined($patterns)) {
usage "missing patterns";
if (!defined($os)) {
usage "missing os";
}
if (!defined($memory)) {
$memory = 'all';
}
if (!defined($cpuspeed)) {
$cpuspeed = 'all';
}
if (!defined($timezone)) {
usage "missing timezone";
}
if (!defined($patterns)) {
usage "missing patterns";
}
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") {
@ -503,11 +543,11 @@ sub parse_options {
}
if ($testtype eq "shell") {
$knownfailuretesttypepattern = "([^,]*shell[^,]*|\\.\\*)";
$knownfailuretesttypepattern = "(shell|\\.\\*)";
$failuretesttypepattern = "shell";
}
elsif ($testtype eq "browser") {
$knownfailuretesttypepattern = "([^,]*browser[^,]*|\\.\\*)";
$knownfailuretesttypepattern = "(browser|\\.\\*)";
$failuretesttypepattern = "browser";
}
elsif ($testtype eq "all") {
@ -515,17 +555,34 @@ sub parse_options {
$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 {
@ -533,13 +590,31 @@ sub parse_options {
$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";
}

159
js/tests/pattern-expander.pl Executable file
Просмотреть файл

@ -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();
}

217
js/tests/pattern-extracter.pl Executable file
Просмотреть файл

@ -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;
}

Просмотреть файл

@ -62,6 +62,7 @@ open TEMP, ">$temp" or
local ($test_id,
$tmp_test_id,
$tmp_test_exit_status,
%test_id,
%test_reported,
$test_result,
@ -72,12 +73,14 @@ local ($test_id,
$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_memory = 0;
local $test_cpuspeed = 0;
local %test_reported = ();
while ($file = shift @ARGV)
@ -100,7 +103,22 @@ while ($file = shift @ARGV)
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";
@ -116,13 +134,21 @@ while ($file = shift @ARGV)
$_ =~ 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;
@ -133,316 +159,115 @@ while ($file = shift @ARGV)
}
}
if ($test_product eq "js")
if ($test_cpuspeed < 4)
{
while (<FILE>)
{
chomp;
dbg "INPUT: $_";
if (/Wrote results to/)
{
$state = 'success';
last;
$test_cpuspeed = 'slow';
}
$_ =~ s/[\r]$//;
$_ =~ s/[\r]/CR/g;
$_ =~ s/[\x01-\x08]//g;
$_ =~ s/\s+$//;
next if ( $_ !~ /^jstest: /);
($test_id) = $_ =~ /^jstest: (.*?) *bug:/;
($test_result) = $_ =~ /result: (.*?) *type:/;
($test_type) = $_ =~ /type: (.*?) *description:/;
($test_description) = $_ =~ /description: (.*)/;
if (!$test_description)
elsif ($test_cpuspeed < 9)
{
$test_description = "";
$test_cpuspeed = 'medium';
}
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";
}
$test_cpuspeed = 'fast';
}
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 ($test_product eq "js")
{
dbg "Adding message: /$test_id:0: out of memory";
$test_description .= "; /$test_id:0: out of memory";
$test_type = "shell";
}
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;
dbg "-";
}
}
elsif ($test_product eq "firefox")
elsif ($test_product eq "firefox" || $test_product eq "thunderbird")
{
%test_id = ();
@messages = ();
$page_status = '';
$exit_status = '';
$test_buildtype = "nightly" unless $test_buildtype;
$test_type = "browser";
}
# 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
# Input
# -----------------------------
# JavaScriptTest: Begin Run
# JavaScriptTest: Begin Test t;
# jstest: t
# t:.*EXIT STATUS:
# JavaScriptTest: End Test t
# JavaScriptTest: End Run
# EOF
#
# 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
dbg "Assuming starting in restart mode";
$mode = 'restart';
%test_id = ();
@messages = ();
$test_exit_status = '';
$state = 'idle';
while (<FILE>)
{
chomp;
# remove carriage returns, bels and other annoyances.
if ($debug)
{
dbg "\nINPUT: '$_'";
}
$_ =~ s/[\r]$//;
$_ =~ s/[\r]/CR/g;
$_ =~ s/[\x01-\x08]//g;
$_ =~ s/\s+$//;
if ($debug)
if ( /^JavaScriptTest: Begin Run/)
{
dbg "\nINPUT: $_";
}
dbg "Begin Run";
# 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;
if (/^Spider: Start.*start-spider.html/)
{
if ($state eq 'idle')
{
$state = 'startrun';
$state = 'beginrun';
}
else
{
warn "WARNING: state: $state, expected: idle, log: $file";
$state = 'startrun';
$state = 'beginrun';
}
}
elsif (/^Spider: Begin loading.*start-spider.html/)
{
if ($state eq 'startrun')
{
$state = 'startrun';
}
else
{
warn "WARNING: state: $state, expected: startrun, log: $file";
$state = 'startrun';
}
}
elsif (/^Start Spider: try.*EXIT STATUS: NORMAL/)
{
if ($state eq 'startrun')
{
$state = 'initialized';
}
else
{
warn "WARNING: state: $state, expected: startrun, log: $file";
$state = 'initialized';
}
}
elsif (/^Start Spider: try.*EXIT STATUS: (TIMED OUT|CRASHED)/)
{
if ($state eq 'startrun')
{
$state = 'startrun';
}
else
{
warn "WARNING: state: $state, expected: startrun, log: $file";
$state = 'startrun';
}
}
elsif ( /^Spider: Start: -url .*test.mozilla.com.tests.mozilla.org.js.urllist-/)
{
dbg "Setting mode to nonrestart";
$mode = 'nonrestart';
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 ($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 = ();
}
elsif ( /^JavaScriptTest: Begin Run/)
{
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';
}
}
elsif ( ($tmp_test_id) = $_ =~ /^Spider: Begin loading http.*test=([^;]*);/)
{
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";
}
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_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";
}
dbg "Begin Test: $tmp_test_id";
if ($state eq 'loadingtest')
if ($state eq 'beginrun' || $state eq 'endtest')
{
$state = 'runningtest';
}
else
{
warn "WARNING: state: $state, expected: loadingtest, log: $file";
warn "WARNING: state: $state, expected: beginrun, endtest, log: $file";
$state = 'runningtest';
}
$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 = '';
push @expected_exit_code_list, (3) if ($tmp_test_id =~ /-n.js$/);
}
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:/)
{
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 "jstest: $tmp_test_id";
# 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')
{
@ -452,13 +277,9 @@ while ($file = shift @ARGV)
{
$state = 'reportingtest';
}
elsif ($state eq 'pendingtest')
{
$state = 'reportingtest';
}
else
{
warn "WARNING: test_id: $test_id{$state}, state: $state, expected: runningtest, reportingtest, pendingtest, log: $file";
warn "WARNING: test_id: $test_id{$state}, state: $state, expected: runningtest, reportingtest, log: $file";
$state = 'reportingtest';
}
@ -474,321 +295,198 @@ while ($file = shift @ARGV)
{
$test_description = "";
}
$test_description .= ' ' . join '; ', @messages;
$test_description .= '; messages: ' . (join '; ', @messages) . ';';
outputrecord $tmp_test_id, $test_description, $test_result;
$test_id{$state} = $tmp_test_id;
}
elsif ( ($tmp_test_id) = $_ =~ /^Spider: Finish loading http.*test=([^;]*);/)
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 ($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";
warn "WARNING: state: $state, mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
}
if ($state eq 'reportingtest')
if ($state eq 'reportingtest' || $state eq 'runningtest')
{
$state = 'loadedtest';
$state = 'exitedtest';
}
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';
warn "WARNING: state: $state, expected: reportingtest, runningtest, log: $file";
$state = 'exitedtest';
}
if (! $test_reported{$tmp_test_id})
{
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;
}
$test_id{$state} = $tmp_test_id;
}
elsif ( ($tmp_test_id) = $_ =~ /^Spider: Current Url:.*test=([^;]*);/)
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 ($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";
warn "WARNING: state: $state, mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
}
if ($state eq 'loadedtest')
if ($state eq 'reportingtest' || $state eq 'runningtest')
{
$state = 'loadedtest';
}
elsif ($state eq 'reportingtest')
{
$state = 'loadedtest';
}
elsif ($state eq 'pendingtest')
{
$state = 'pendingtest';
$state = 'exitedtest';
}
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 ($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;
}
elsif ( ($tmp_test_id, $page_status) = $_ =~ /^http:.*test=([^;]*);.* (PAGE STATUS: TIMED OUT.*)/)
{
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;;
$test_description .= '; messages: ' . (join '; ', @messages) . ';';
outputrecord $tmp_test_id, $test_description, $test_result;
$test_id{$state} = $tmp_test_id;
}
elsif ( ($tmp_test_id) = $_ =~ /^JavaScriptTest: ([^ ]*) Elapsed time/)
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 ($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";
warn "WARNING: state: $state, mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
}
if ($state eq 'loadedtest')
if ($state eq 'reportingtest' || $state eq 'runningtest')
{
$state = 'completedtest';
}
elsif ($state eq 'pendingtest')
{
$state = 'pendingtest';
}
elsif ($state eq 'reportingtest')
{
# test was pending, but has been reported.
$state = 'completedtest';
$state = 'exitedtest';
}
else
{
warn "WARNING: state: $state, expected: loadedtest, loadedtest, pendingtest, reportingtest, log: $file";
$state = 'completedtest';
dbg "state: $state, expected: reportingtest, runningtest";
$state = 'exitedtest';
}
$test_result = 'FAILED';
$test_description .= '; messages: ' . (join '; ', @messages) . ';';
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";
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";
}
if ($state eq 'reportingtest' || $state eq 'runningtest')
{
$state = 'exitedtest';
}
else
{
dbg "state: $state, expected: reportingtest, runningtest";
$state = 'exitedtest';
}
($exit_code) = $test_exit_status =~ /ABNORMAL ([0-9]+)/;
if (grep /$exit_code/, @expected_exit_code_list)
{
$test_result = 'PASSED';
}
else
{
$test_result = 'FAILED';
}
$test_description .= '; messages: ' . (join '; ', @messages) . ';';
dbg "Exit Code: $exit_code, Test Result: $test_result, Expected Exit Codes: " . (join '; ', @expected_exit_code_list);
outputrecord $tmp_test_id, $test_description, $test_result;
$test_id{$state} = $tmp_test_id;
}
elsif ( ($tmp_test_id) = $_ =~ /^JavaScriptTest: End Test ([^ ]*)/)
{
dbg "End Test: $tmp_test_id";
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";
warn "WARNING: state: $state, mismatched test_id: expected: $tmp_test_id, actual: $test_id{$state}, log: $file";
}
if ($state eq 'completedtest')
if ($state eq 'exitedtest' || $state eq 'runningtest' || $state eq 'reportingtest')
{
if ($mode eq 'restart')
{
$state = 'completedtest';
$state = 'endtest';
}
else
{
$state = 'starttest';
}
}
elsif ($state eq 'pendingtest')
{
$state = 'completedtest';
$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';
warn "WARNING: state: $state, expected: runningtest, reportingtest, exitedtest, log: $file";
$state = 'endtest';
}
$test_id{$state} = $tmp_test_id;
}
elsif ( /^JavaScriptTest: End Run/)
{
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';
}
}
elsif ( ($tmp_test_id, $exit_status) = $_ =~ /^http:.*test=([^;]*);.* (EXIT STATUS: NORMAL.*)/)
{
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";
}
dbg "End Run";
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';
}
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 ( ($tmp_test_id, $exit_status) = $_ =~ /^http:.*test=([^;]*);.* (EXIT STATUS: TIMED OUT.*)/)
{
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')
if ($state eq 'endtest')
{
$state = 'endrun';
}
else
{
dbg "state: $state, expected: endrun";
warn "WARNING: state: $state, expected: endtest, log: $file";
$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;
}
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 ($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;
}
elsif ( m@^(\/cygdrive\/.|\/.)?$test_dir$@)
{
if ($state eq 'endrun')
{
$state = 'success';
}
else
{
warn "WARNING: state: $state, expected: endrun, log: $file";
$state = 'success';
}
$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/)
if ('runningtest, reportingtest' =~ /$state/)
{
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/ )
/set a breakpoint in szone_error to debug/ || /malloc:.*mmap/ || /vm_allocate/ ||
/terminate called after throwing an instance of 'std::bad_alloc'/)
{
dbg "Adding message: $_ converted to /$test_id{$state}:0: out of memory";
push @messages, ('/' . $test_id{$state} . ':0: out of memory');
}
elsif (/\.js, line [0-9]+: out of memory/ )
{
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
{
dbg "Adding message: $_";
@ -796,34 +494,40 @@ while ($file = shift @ARGV)
}
}
}
elsif ($debug)
{
dbg "Skipping: $_";
}
if ($debug)
{
if ($test_id{$state})
{
dbg "test_id{$state}=$test_id{$state}, " . join '; ', @messages;
dbg "test_id{$state}=$test_id{$state}, " . (join '; ', @messages);
}
else
{
dbg "state=$state, " . join '; ', @messages;
dbg "state=$state, " . (join '; ', @messages);
}
}
}
if ($state eq 'endrun')
{
$state = 'success';
}
close FILE;
undef $test_branchid;
undef $test_date;
undef $test_buildtype;
undef $test_machine;
undef $test_product;
undef $test_suite;
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;
@ -838,7 +542,9 @@ sub dbg {
sub outresults
{
dbg "sorting temp file $temp";
system("sort < $temp | uniq");
dbg "finished sorting";
}
sub outputrecord
@ -849,17 +555,29 @@ sub outputrecord
# 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)
{

Просмотреть файл

@ -74,6 +74,14 @@ 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.
@ -83,20 +91,12 @@ arch optional. The machine architecture as specified by uname -p
'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
do
case $optname in
l) testlogfiles=$OPTARG;;
A) optarch=$OPTARG;;
@ -112,6 +112,24 @@ 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;;
@ -133,8 +151,9 @@ for testlogfile in `ls $testlogfiles`; do
*,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
@ -144,11 +163,11 @@ for testlogfile in `ls $testlogfiles`; do
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
@ -160,11 +179,9 @@ for testlogfile in `ls $testlogfiles`; do
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
@ -173,15 +190,14 @@ for testlogfile in `ls $testlogfiles`; do
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"
@ -191,9 +207,25 @@ for testlogfile in `ls $testlogfiles`; do
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
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" -z "$timezone" -l "$testlogfile" -A "$arch" -K "$kernel" -r "$TEST_JSDIR/failures.txt" -O "$outputprefix"
$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

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -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

Просмотреть файл

@ -66,15 +66,17 @@ 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'.
@ -83,10 +85,6 @@ variable description
-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
@ -97,8 +95,6 @@ variable description
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.
@ -108,6 +104,8 @@ variable description
-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
@ -116,7 +114,7 @@ EOF
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;;
@ -127,7 +125,6 @@ do
B) buildcommands=$OPTARG;;
v) verbose=1
verboseflag="-v";;
R) restart=1;;
S) summary=1;;
X) excludetests=$OPTARG;;
I) includetests=$OPTARG;;
@ -180,24 +177,6 @@ if [[ -n "$fatalerrors" ]]; then
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
@ -209,24 +188,40 @@ for testlogfile in $testlogfiles; do
*,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
@ -252,6 +247,6 @@ for testlogfile in $testlogfiles; do
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

Просмотреть файл

@ -160,8 +160,8 @@ TestCase.prototype.dump = function () {
'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');
};

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -63,55 +63,351 @@ 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
for data in $datafiles; do
source $data
done
if [[ -n "$gczeal" && "$buildtype" != "debug" ]]; then
error "gczeal is supported for buildtype debug and not $buildtype"
fi
case "$product" in
firefox) testscript=$TEST_JSDIR/test-browser.sh;;
js) testscript=$TEST_JSDIR/test-shell.sh;;
*) echo "unknown product [$product]"
exit 2
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
$testscript -d "$datafiles" $gczeal
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 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
# 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
popd

100
js/tests/universe.data Normal file
Просмотреть файл

@ -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

Просмотреть файл

@ -54,7 +54,6 @@ function userOnStart()
try
{
dlog('userOnStart');
cdump('JavaScriptTest: Begin Run');
registerDialogCloser();
}
catch(ex)
@ -72,7 +71,6 @@ function userOnBeforePage()
gCurrentTestId = /test=(.*);language/.exec(gSpider.mCurrentUrl.mUrl)[1];
gCurrentTestValid = true;
cdump('JavaScriptTest: Begin Test ' + gCurrentTestId);
gCurrentTestStart = new Date();
}
catch(ex)
@ -90,7 +88,6 @@ function userOnAfterPage()
dlog('userOnAfterPage');
gPageStop = new Date();
cdump(gSpider.mCurrentUrl.mUrl + ': PAGE STATUS: NORMAL (' + ((gPageStop - gPageStart)/1000).toFixed(0) + ' seconds)');
checkTestCompleted();
}
catch(ex)
@ -106,7 +103,6 @@ function userOnStop()
try
{
// close any pending dialogs
cdump('JavaScriptTest: End Run');
closeDialog();
unregisterDialogCloser();
}
@ -119,7 +115,6 @@ function userOnStop()
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
@ -137,7 +132,6 @@ function userOnPageTimeout()
cdump('Spider: WARNING ERROR: userOnPageTimeout: ' + ex);
}
}
cdump('JavaScriptTest: End Test ' + gCurrentTestId);
}
function checkTestCompleted()
@ -181,7 +175,6 @@ function checkTestCompleted()
{
}
cdump('JavaScriptTest: ' + gCurrentTestId + ' Elapsed time ' + ((gCurrentTestStop - gCurrentTestStart)/1000).toFixed(2) + ' seconds');
cdump('JavaScriptTest: End Test ' + gCurrentTestId);
gPageCompleted = true;
}