WebKit Bugzilla
Attachment 342534 Details for
Bug 186399
: test262/Runner.pm: minor updates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186399-20180612103202.patch (text/plain), 7.58 KB, created by
valerie
on 2018-06-12 07:32:03 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
valerie
Created:
2018-06-12 07:32:03 PDT
Size:
7.58 KB
patch
obsolete
>Subversion Revision: 232750 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index fcb676ba14799927a2c2c033ead6f5bc9766c5a6..c7bb615c358242fb65a5f0ef65b00826a3cf5d02 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,26 @@ >+2018-06-12 Valerie R Young <valerie@bocoup.com> >+ >+ test262/Runner.pm: minor updates >+ https://bugs.webkit.org/show_bug.cgi?id=186399 >+ >+ - If harness files cannot be found in a CLI supplied >+ test262 path, then default to webkit's test262 harness files. >+ - Lazily create the test262-results directory (only right before >+ writing to it) >+ - If an expectation file is supplied via the CLI, save to the >+ supplied location instead of the default webkit location >+ (JSTest/test262/expectation.yaml). >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/test262/Runner.pm: >+ (processCLI): >+ (main): >+ (compileTest): >+ (processResult): >+ (getHarness): >+ (summarizeResults): >+ > 2018-06-11 Carlos Alberto Lopez Perez <clopez@igalia.com> > > [JSCOnly] Add a MIPS32el JSCOnly EWS >@@ -671,7 +694,7 @@ > (availableXcodeSDKS): Generate a list of all available Xcode SDKs on this machine. > (determineXcodeSDK): Always prefer .internal SDKs if available. > * Scripts/webkitperl/webkitdirs_unittest/availableXcodeSDKS.pl: >- >+ > 2018-06-07 Fujii Hironori <Hironori.Fujii@sony.com> > > [Win][MiniBrowser] Support multiple windows properly >diff --git a/Tools/Scripts/test262/Runner.pm b/Tools/Scripts/test262/Runner.pm >index dab4b1fdb9223f6311fc15094ecd5258166096b3..f2f412828dbc4be8a94ce7dc34760ae9ac62d741 100755 >--- a/Tools/Scripts/test262/Runner.pm >+++ b/Tools/Scripts/test262/Runner.pm >@@ -78,7 +78,6 @@ my $max_process; > my @cliTestDirs; > my $verbose; > my $JSC; >-my $test262Dir; > my $harnessDir; > my %filterFeatures; > my $ignoreConfig; >@@ -91,15 +90,15 @@ my $latestImport; > my $runningAllTests; > my $timeout; > >-my $expectationsFile = abs_path("$Bin/../../../JSTests/test262/expectations.yaml"); >-my $configFile = abs_path("$Bin/../../../JSTests/test262/config.yaml"); >+my $test262Dir; >+my $webkitTest262Dir = abs_path("$Bin/../../../JSTests/test262"); >+my $expectationsFile = abs_path("$webkitTest262Dir/expectations.yaml"); >+my $configFile = abs_path("$webkitTest262Dir/config.yaml"); > > my $resultsDir = $ENV{PWD} . "/test262-results"; >-mkpath($resultsDir); >- >-my $resultsFile = abs_path("$resultsDir/results.yaml"); >-my $summaryTxtFile = abs_path("$resultsDir/summary.txt"); >-my $summaryFile = abs_path("$resultsDir/summary.yaml"); >+my $resultsFile; >+my $summaryTxtFile; >+my $summaryFile; > > my @results; > my @files; >@@ -107,8 +106,6 @@ my @files; > my $tempdir = tempdir(); > my ($deffh, $deffile) = getTempFile(); > >-my @default_harnesses; >- > my $startTime = time(); > > main(); >@@ -166,15 +163,26 @@ sub processCLI { > } > } > >- if ($stats) { >- if (! -e $resultsFile) { >- die "Error: cannot find results file to summarize," . >+ if ($stats || $failingOnly) { >+ # If not supplied, try to find the results file in expected directory >+ $resultsFile ||= abs_path("$resultsDir/results.yaml"); >+ >+ if ($failingOnly && ! -e $resultsFile) { >+ die "Error: cannot find results file to run failing tests," . > "please specify with --results."; > } >- summarizeResults(); >- exit; >+ >+ if ($stats) { >+ if (! -e $resultsFile) { >+ die "Error: cannot find results file to summarize," . >+ " please specify with --results."; >+ } >+ summarizeResults(); >+ exit; >+ } > } > >+ > if ($JSC) { > $JSC = abs_path($JSC); > # Make sure the path and file jsc exist >@@ -195,11 +203,18 @@ sub processCLI { > } > > if (! $test262Dir) { >- $test262Dir = abs_path("$Bin/../../../JSTests/test262"); >+ $test262Dir = $webkitTest262Dir; > } else { > $test262Dir = abs_path($test262Dir); > } >+ > $harnessDir = "$test262Dir/harness"; >+ if (! -e $harnessDir) { >+ # if the harness directory does not exist in the custom test262 path, >+ # then use the webkits harness directory. >+ $harnessDir = "$webkitTest262Dir/harness"; >+ } >+ > > if (! $ignoreConfig) { > if ($configFile && ! -e $configFile) { >@@ -212,11 +227,6 @@ sub processCLI { > } > } > >- if ( $failingOnly && ! -e $resultsFile ) { >- die "Error: cannot find results file to run failing tests," . >- " please specify with --results."; >- } >- > if ($specifiedExpectationsFile) { > $expectationsFile = abs_path($specifiedExpectationsFile); > if (! -e $expectationsFile && ! $ignoreExpectations) { >@@ -256,16 +266,18 @@ sub processCLI { > print "--------------------------------------------------------\n\n"; > } > >+ > sub main { > processCLI(); > >- @default_harnesses = ( >+ my @defaultHarnessFiles = ( > "$harnessDir/sta.js", > "$harnessDir/assert.js", > "$harnessDir/doneprintHandle.js", > "$Bin/agent.js" > ); >- print $deffh getHarness(<@default_harnesses>); >+ >+ print $deffh getHarness(\@defaultHarnessFiles); > > # If not commandline test path supplied, use the root directory of all tests. > push(@cliTestDirs, 'test') if not @cliTestDirs; >@@ -389,6 +401,11 @@ sub main { > } > > if ($runningAllTests) { >+ if (! -e $resultsDir) { >+ mkpath($resultsDir); >+ } >+ $resultsFile = abs_path("$resultsDir/results.yaml"); >+ > DumpFile($resultsFile, \@results); > print "Saved all the results in $resultsFile\n"; > summarizeResults(); >@@ -592,7 +609,8 @@ sub compileTest { > my $includes = shift; > my ($tfh, $tfname) = getTempFile(); > >- my $includesContent = getHarness(map { "$harnessDir/$_" } @{ $includes }); >+ my @includes = map { "$harnessDir/$_" } @{ $includes }; >+ my $includesContent = getHarness(\@includes); > print $tfh $includesContent; > > return ($tfh, $tfname); >@@ -664,10 +682,11 @@ sub processResult { > > if ($scenario ne 'skip' && $currentfailure) { > >- # We have a new failure if we have loaded an expectation file >- # AND (there is no expected failure OR the failure has changed). >- my $isnewfailure = $expect >- && (!$expectedfailure || $expectedfailure ne $currentfailure); >+ # We have a new failure if we haven't loaded an expectation file >+ # (all fails are new) OR we have loaded an expectation fail and >+ # (there is no expected failure OR the failure has changed). >+ my $isnewfailure = ! $expect >+ || !$expectedfailure || $expectedfailure ne $currentfailure; > > # Print the failure if we haven't loaded an expectation file > # or the failure is new. >@@ -747,9 +766,10 @@ sub parseData { > } > > sub getHarness { >- my @files = @_; >+ my ($filesref) = @_; >+ > my $content; >- for (@files) { >+ for (@{$filesref}) { > my $file = $_; > > open(my $harness_file, '<', $file) >@@ -760,7 +780,7 @@ sub getHarness { > close $harness_file; > }; > >- return $content; >+ return $content || ''; > } > > sub summarizeResults { >@@ -770,6 +790,14 @@ sub summarizeResults { > my @rawresults = LoadFile($resultsFile) or die $!; > @results = @{$rawresults[0]}; > } >+ >+ # Create test262-results folder if it does not exits >+ if (! -e $resultsDir) { >+ mkpath($resultsDir); >+ } >+ $summaryTxtFile = abs_path("$resultsDir/summary.txt"); >+ $summaryFile = abs_path("$resultsDir/summary.yaml"); >+ > my %byfeature; > my %bypath; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186399
:
342183
|
342201
| 342534 |
342545
|
342549