WebKit Bugzilla
Attachment 342746 Details for
Bug 185749
: Test262-Runner: Add more information in the summarized stats
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185749-20180614141321.patch (text/plain), 5.49 KB, created by
Leo Balter
on 2018-06-14 11:13:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Leo Balter
Created:
2018-06-14 11:13:22 PDT
Size:
5.49 KB
patch
obsolete
>Subversion Revision: 232841 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index bc25ed2d42fe4eef9073468013580e92e90322b6..afe84b71b1d7ce59790c0e744aaf0363a4ef0761 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-17 Leo Balter <leonardo.balter@gmail.com> >+ >+ Test262-Runner: Add more information in the summarized stats >+ https://bugs.webkit.org/show_bug.cgi?id=185749 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch adds extra information in the summarized stats for the given results for each run. >+ This includes a total of files, a total of executed files and a time information per path and feature. >+ * Scripts/test262/Runner.pm: >+ (summarizeResults): >+ > 2018-06-14 Valerie R Young <valerie@bocoup.com> > > [test262-runner] Test output should summarize tests that are >diff --git a/Tools/Scripts/test262/Runner.pm b/Tools/Scripts/test262/Runner.pm >index d045d5589027b52b61d4dcf8667152831aa1deec..7de09b0c1c8f6f863abdca0a6fc37e98d00acc3c 100755 >--- a/Tools/Scripts/test262/Runner.pm >+++ b/Tools/Scripts/test262/Runner.pm >@@ -841,7 +841,7 @@ sub summarizeResults { > foreach my $feature (@{$test->{features}}) { > > if (not exists $byfeature{$feature}) { >- $byfeature{$feature} = [0, 0, 0] >+ $byfeature{$feature} = [0, 0, 0, 0]; > } > > if ($result eq 'PASS') { >@@ -853,6 +853,10 @@ sub summarizeResults { > if ($result eq 'SKIP') { > $byfeature{$feature}->[2]++; > } >+ >+ if ($test->{time}) { >+ $byfeature{$feature}->[3] += $test->{time}; >+ } > } > } > my @paths = split('/', $test->{path}); >@@ -861,7 +865,7 @@ sub summarizeResults { > my $partialpath = join("/", @paths[0...$i]); > > if (not exists $bypath{$partialpath}) { >- $bypath{$partialpath} = [0, 0, 0]; >+ $bypath{$partialpath} = [0, 0, 0, 0]; > } > > if ($result eq 'PASS') { >@@ -873,42 +877,72 @@ sub summarizeResults { > if ($result eq 'SKIP') { > $bypath{$partialpath}->[2]++; > } >+ >+ if ($test->{time}) { >+ $bypath{$partialpath}->[3] += $test->{time}; >+ } > } > > } > > open(my $sfh, '>', $summaryTxtFile) or die $!; > >- print $sfh sprintf("%-6s %-6s %-6s %-6s %s\n", '%PASS', 'PASS', 'FAIL', 'SKIP', 'FOLDER'); >+ print $sfh sprintf("%-6s %-6s %-6s %-6s %-6s %-6s %-7s %-6s %s\n", 'TOTAL', 'RAN', 'PASS-%', 'PASS', 'FAIL', 'SKIP', 'TIME', 'AVG', 'FOLDER'); > foreach my $key (sort keys %bypath) { >- my $per = ($bypath{$key}->[0] / ( >- $bypath{$key}->[0] >- + $bypath{$key}->[1] >- + $bypath{$key}->[2])) * 100; >+ my $totalFilesRan = $bypath{$key}->[0] + $bypath{$key}->[1]; >+ my $totalFiles = $totalFilesRan + $bypath{$key}->[2]; >+ >+ my $per = sprintf("%.0f", ($bypath{$key}->[0] / $totalFiles) * 100) . "%"; >+ >+ my $time = sprintf("%.1f", $bypath{$key}->[3]) . "s"; >+ my $avgTime; > >- $per = sprintf("%.0f", $per) . "%"; >+ if ($totalFilesRan) { >+ $avgTime = sprintf("%.2f", $bypath{$key}->[3] / $totalFilesRan) . "s"; >+ } else { >+ $avgTime = "0s"; >+ } > >- print $sfh sprintf("%-6s %-6d %-6d %-6d %s \n", $per, >+ print $sfh sprintf("%-6s %-6s %-6s %-6d %-6d %-6d %-7s %-6s %s\n", >+ $totalFiles, >+ $totalFilesRan, >+ $per, > $bypath{$key}->[0], > $bypath{$key}->[1], >- $bypath{$key}->[2], $key,); >+ $bypath{$key}->[2], >+ $time, >+ $avgTime, >+ $key); > } > > print $sfh "\n\n"; >- print $sfh sprintf("%-6s %-6s %-6s %-6s %s\n", '%PASS', 'PASS', 'FAIL', 'SKIP', 'FEATURE'); >+ print $sfh sprintf("%-6s %-6s %-6s %-6s %-6s %-6s %-7s %-6s %s\n", 'TOTAL', 'RAN', 'PASS-%', 'PASS', 'FAIL', 'SKIP', 'TIME', 'AVG', 'FEATURE'); > > foreach my $key (sort keys %byfeature) { >- my $per = ($byfeature{$key}->[0] / ( >- $byfeature{$key}->[0] >- + $byfeature{$key}->[1] >- + $byfeature{$key}->[2])) * 100; >+ my $totalFilesRan = $byfeature{$key}->[0] + $byfeature{$key}->[1]; >+ my $totalFiles = $totalFilesRan + $byfeature{$key}->[2]; >+ >+ my $per = sprintf("%.0f", ($byfeature{$key}->[0] / $totalFiles) * 100) . "%"; > >- $per = sprintf("%.0f", $per) . "%"; >+ my $time = sprintf("%.1f", $byfeature{$key}->[3]) . "s"; >+ my $avgTime; >+ >+ if ($totalFilesRan) { >+ $avgTime = sprintf("%.2f", $byfeature{$key}->[3] / $totalFilesRan) . "s"; >+ } else { >+ $avgTime = "0s"; >+ } > >- print $sfh sprintf("%-6s %-6d %-6d %-6d %s\n", $per, >+ print $sfh sprintf("%-6s %-6s %-6s %-6d %-6d %-6d %-7s %-6s %s\n", >+ $totalFiles, >+ $totalFilesRan, >+ $per, > $byfeature{$key}->[0], > $byfeature{$key}->[1], >- $byfeature{$key}->[2], $key); >+ $byfeature{$key}->[2], >+ $time, >+ $avgTime, >+ $key); > } > > close($sfh);
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 185749
:
340657
| 342746