WebKit Bugzilla
Attachment 339307 Details for
Bug 185200
: test262/Runner.pm: save summary to file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185200-20180502123501.patch (text/plain), 6.93 KB, created by
valerie
on 2018-05-02 09:35:02 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
valerie
Created:
2018-05-02 09:35:02 PDT
Size:
6.93 KB
patch
obsolete
>Subversion Revision: 231230 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 7e547de7660bad661616f05189c0f4a737087311..bc8ceb0dde25b4a67932d2767b10f82a5c0a94fd 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-02 Valerie R Young <valerie@bocoup.com> >+ >+ test262/Runner.pm: save summary to file >+ https://bugs.webkit.org/show_bug.cgi?id=185200 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/test262/Runner.pm: >+ (processCLI): >+ (main): >+ (summarizeResults): >+ > 2018-05-02 Carlos Alberto Lopez Perez <clopez@igalia.com> > > [GTK] Generate a JSC bundle on the 64 and 32 bit release bots and upload it to webkitgtk.org >diff --git a/Tools/Scripts/test262/Runner.pm b/Tools/Scripts/test262/Runner.pm >index 583409396ebe6d922446003dcd12ec879ed449ca..c90cd6cb9fecb8d12a92819095058b722d859c0d 100755 >--- a/Tools/Scripts/test262/Runner.pm >+++ b/Tools/Scripts/test262/Runner.pm >@@ -58,6 +58,7 @@ BEGIN { > } > > use YAML qw(Load LoadFile Dump DumpFile Bless); >+use JSON; > use Parallel::ForkManager; > use Getopt::Long qw(GetOptions); > use Pod::Usage; >@@ -79,10 +80,13 @@ my $saveExpectations; > my $failingOnly; > my $latestImport; > my $runningAllTests; >+my @results; > > my $expectationsFile = abs_path("$Bin/expectations.yaml"); > my $configFile = abs_path("$Bin/config.yaml"); > my $resultsFile = abs_path("$Bin/results.yaml"); >+my $summaryTxtFile = abs_path("$Bin/results-summary.txt"); >+my $summaryFile = abs_path("$Bin/results-summary.yaml"); > > processCLI(); > >@@ -137,7 +141,6 @@ sub processCLI { > } > > if ($stats) { >- print "Summarizing results...\n\n"; > summarizeResults(); > exit; > } >@@ -256,10 +259,10 @@ sub main { > close $deffh; > > seek($resfh, 0, 0); >- my @res = LoadFile($resfh); >+ @results = LoadFile($resfh); > close $resfh; > >- @res = sort { "$a->{path} . $a->{mode}" cmp "$b->{path} . $b->{mode}" } @res; >+ @results = sort { "$a->{path} . $a->{mode}" cmp "$b->{path} . $b->{mode}" } @results; > > my %failed; > my $failcount = 0; >@@ -268,7 +271,7 @@ sub main { > my $skipfilecount = 0; > > # Create expectation file and calculate results >- foreach my $test (@res) { >+ foreach my $test (@results) { > > my $expectedFailure = 0; > if ($expect && $expect->{$test->{path}}) { >@@ -309,13 +312,12 @@ sub main { > } > > if ($runningAllTests) { >- DumpFile($resultsFile, \@res); >- print "Saved all the results in the $resultsFile."; >- print "Summarizing results...\n\n"; >+ DumpFile($resultsFile, \@results); >+ print "Saved all the results in $resultsFile\n"; > summarizeResults(); > } > >- my $total = scalar @res - $skipfilecount; >+ my $total = scalar @results - $skipfilecount; > print "\n" . $total . " tests ran\n"; > > if ( !$expect ) { >@@ -655,12 +657,16 @@ sub getHarness { > } > > sub summarizeResults { >- my @rawresults = LoadFile($resultsFile) or die $!; >+ print "Summarizing results...\n"; > >+ if (not @results) { >+ my @rawresults = LoadFile($resultsFile) or die $!; >+ @results = @{$rawresults[0]}; >+ } > my %byfeature; > my %bypath; > >- foreach my $test (@{$rawresults[0]}) { >+ foreach my $test (@results) { > my $result = $test->{result}; > > if ($test->{features}) { >@@ -703,11 +709,10 @@ sub summarizeResults { > > } > >- print sprintf("%-6s %-6s %-6s %-6s %s\n", '% PASS', 'PASS', 'FAIL', 'SKIP', 'FOLDER'); >- foreach my $key (sort keys %bypath) { >- my $c = 'bold'; >- $c = 'clear' if $bypath{$key}->[1]; >+ open(my $sfh, '>', $summaryTxtFile) or die $!; > >+ print $sfh sprintf("%-6s %-6s %-6s %-6s %s\n", '%PASS', 'PASS', 'FAIL', 'SKIP', 'FOLDER'); >+ foreach my $key (sort keys %bypath) { > my $per = ($bypath{$key}->[0] / ( > $bypath{$key}->[0] > + $bypath{$key}->[1] >@@ -715,19 +720,16 @@ sub summarizeResults { > > $per = sprintf("%.0f", $per) . "%"; > >- print colored([$c], sprintf("%-6s %-6d %-6d %-6d %s \n", $per, >- $bypath{$key}->[0], >- $bypath{$key}->[1], >- $bypath{$key}->[2], $key,)); >+ print $sfh sprintf("%-6s %-6d %-6d %-6d %s \n", $per, >+ $bypath{$key}->[0], >+ $bypath{$key}->[1], >+ $bypath{$key}->[2], $key,); > } > >- print "\n\n"; >- print sprintf("%-6s %-6s %-6s %-6s %s\n", '% PASS', 'PASS', 'FAIL', 'SKIP', 'FEATURE'); >+ print $sfh "\n\n"; >+ print $sfh sprintf("%-6s %-6s %-6s %-6s %s\n", '%PASS', 'PASS', 'FAIL', 'SKIP', 'FEATURE'); > > foreach my $key (sort keys %byfeature) { >- my $c = 'bold'; >- $c = 'clear' if $byfeature{$key}->[1]; >- > my $per = ($byfeature{$key}->[0] / ( > $byfeature{$key}->[0] > + $byfeature{$key}->[1] >@@ -735,11 +737,22 @@ sub summarizeResults { > > $per = sprintf("%.0f", $per) . "%"; > >- print colored([$c], sprintf("%-6s %-6d %-6d %-6d %s\n", $per, >- $byfeature{$key}->[0], >- $byfeature{$key}->[1], >- $byfeature{$key}->[2], $key)); >+ print $sfh sprintf("%-6s %-6d %-6d %-6d %s\n", $per, >+ $byfeature{$key}->[0], >+ $byfeature{$key}->[1], >+ $byfeature{$key}->[2], $key); > } >+ >+ close($sfh); >+ >+ my %resultsyaml = ( >+ byFolder => \%bypath, >+ byFeature => \%byfeature, >+ ); >+ >+ DumpFile($summaryFile, \%resultsyaml); >+ >+ print "See summarized results in $summaryTxtFile\n"; > } > > __END__ >@@ -828,7 +841,7 @@ Runs the test files listed in the last import (./JSTests/test262/latest-changes- > > =item B<--stats> > >-Calculate conformance statistics from test262-results.yaml file. >+Calculate conformance statistics from JSTests/test262-results.yaml file. Saves results in JSTests/test262/results-summary.txt and JSTests/test262/results-summary.yaml. > > =back > >diff --git a/.gitignore b/.gitignore >index 49cc5687d1ea5d86d1f4f74b9c221dcb6619d238..9e16334c90bdeb05e68a1db8554b0d54e70d17f6 100644 >--- a/.gitignore >+++ b/.gitignore >@@ -49,6 +49,7 @@ __cmake_systeminformation/ > # Ignore YouCompleteMe symlinks > .ycm_extra_conf.py > >-# Ignore generated Test262 results file >-Tools/Scripts/test262/test262-results.yaml >- >+# Ignore generated Test262 results files >+Tools/Scripts/test262/results.yaml >+Tools/Scripts/test262/results-summary.yaml >+Tools/Scripts/test262/results-summary.txt >diff --git a/ChangeLog b/ChangeLog >index 2a736dfc47d696408c736787eafbffdb3d9d142a..c48cddf123cdf30694127157c39b94bbf4da6668 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,12 @@ >+2018-05-02 Valerie R Young <valerie@bocoup.com> >+ >+ test262/Runner.pm: save summary to file >+ https://bugs.webkit.org/show_bug.cgi?id=185200 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * .gitignore: >+ > 2018-05-01 Leo Balter <leonardo.balter@gmail.com> > > Auto save the results for Test262
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 185200
: 339307