Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: mozilla-tests/pattern-extracter.pl

Issue 2865028: Update the mozilla tests to new version (as of 2010-06-29). (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mozilla-tests/pattern-expander.pl ('k') | mozilla-tests/performance-1.8.0.tests » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mozilla-tests/pattern-extracter.pl
===================================================================
--- mozilla-tests/pattern-extracter.pl (revision 43940)
+++ mozilla-tests/pattern-extracter.pl (working copy)
@@ -75,8 +75,8 @@
$recordcurr = {};
- my ($test_id, $test_branch, $test_repo, $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_REPO=([^,]*), TEST_BUILDTYPE=([^,]*), TEST_TYPE=([^,]*), TEST_OS=([^,]*), TEST_KERNEL=([^,]*), TEST_PROCESSORTYPE=([^,]*), TEST_MEMORY=([^,]*), TEST_CPUSPEED=([^,]*), TEST_TIMEZONE=([^,]*), TEST_RESULT=([^,]*), TEST_EXITSTATUS=([^,]*), TEST_DESCRIPTION=(.*)/;
+ my ($test_id, $test_branch, $test_repo, $test_buildtype, $test_type, $test_os, $test_kernel, $test_processortype, $test_memory, $test_timezone, $test_options, $test_result, $test_exitstatus, $test_description) = $_ =~
+ /TEST_ID=([^,]*), TEST_BRANCH=([^,]*), TEST_REPO=([^,]*), TEST_BUILDTYPE=([^,]*), TEST_TYPE=([^,]*), TEST_OS=([^,]*), TEST_KERNEL=([^,]*), TEST_PROCESSORTYPE=([^,]*), TEST_MEMORY=([^,]*), TEST_TIMEZONE=([^,]*), TEST_OPTIONS=([^,]*), TEST_RESULT=([^,]*), TEST_EXITSTATUS=([^,]*), TEST_DESCRIPTION=(.*)/;
$recordcurr->{TEST_ID} = $test_id;
$recordcurr->{TEST_BRANCH} = $test_branch;
@@ -87,8 +87,8 @@
$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_OPTIONS} = $test_options;
$recordcurr->{TEST_RESULT} = $test_result;
$recordcurr->{TEST_EXITSTATUS} = $test_exitstatus;
$recordcurr->{TEST_DESCRIPTION} = $test_description;
@@ -130,7 +130,7 @@
@universefielduniverse = getuniverse($universefielduniversekey, $universefield);
dbg("processfile: \@values: ". join(',', @values));
dbg("processfile: \$universefielduniversekey=$universefielduniversekey, \@universefielduniverse=" . join(',', @universefielduniverse));
- @values = ('.*') if (arraysequal(\@values, \@universefielduniverse));
+ @values = ('.*') if (arraysequal($universefield, \@values, \@universefielduniverse));
dbg("processfile: \@values=" . join(',', @values));
for ($v = 0; $v < @values; $v++)
@@ -158,7 +158,7 @@
@universefielduniverse = getuniverse($universefielduniversekey, $universefield);
dbg("processfile: \@values: ". join(',', @values));
dbg("processfile: \$universefielduniversekey=$universefielduniversekey, \@universefielduniverse=" . join(',', @universefielduniverse));
- @values = ('.*') if (arraysequal(\@values, \@universefielduniverse));
+ @values = ('.*') if (arraysequal($universefield, \@values, \@universefielduniverse));
dbg("processfile: \@values=" . join(',', @values));
for ($v = 0; $v < @values; $v++)
@@ -202,12 +202,21 @@
sub arraysequal
{
- my ($larrayref, $rarrayref) = @_;
+ my ($universefield, $larrayref, $rarrayref) = @_;
my $i;
- dbg("arraysequal: checking if " . (join ',', @{$larrayref}) . " is equal to " . (join ',', @{$rarrayref}));
+ dbg("arraysequal: checking $universefield if " . (join ',', @{$larrayref}) . " is equal to " . (join ',', @{$rarrayref}));
+
+ # fail if lengths not equal
return 0 if (@{$larrayref} != @{$rarrayref});
+ # if the universe field is 'important', fail if lengths are 1,
+ # so that important field singletons are not replaced by wildcards.
+ my @importantfields = ('TEST_BRANCH', 'TEST_REPO', 'TEST_BUILDTYPE', 'TEST_TYPE', 'TEST_OS');
+ my @matches = grep /$universefield/, @importantfields;
+
+ return 0 if ( @matches && @{$larrayref} == 1);
+
for ($i = 0; $i < @{$larrayref}; $i++)
{
return 0 if ($rarrayref->[$i] ne $larrayref->[$i]);
« no previous file with comments | « mozilla-tests/pattern-expander.pl ('k') | mozilla-tests/performance-1.8.0.tests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698