Title: [293973] trunk/Tools
Revision
293973
Author
[email protected]
Date
2022-05-09 07:46:18 -0700 (Mon, 09 May 2022)

Log Message

Test262 runner should show progress
https://bugs.webkit.org/show_bug.cgi?id=240181

Reviewed by Yusuke Suzuki.

The progress will appear as something like [42/245669].

* Scripts/test262/Runner.pm:
(processCLI):
(main):

Canonical link: https://commits.webkit.org/250411@main

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (293972 => 293973)


--- trunk/Tools/ChangeLog	2022-05-09 14:05:21 UTC (rev 293972)
+++ trunk/Tools/ChangeLog	2022-05-09 14:46:18 UTC (rev 293973)
@@ -1,3 +1,16 @@
+2022-05-06  Keith Miller  <[email protected]>
+
+        Test262 runner should show progress
+        https://bugs.webkit.org/show_bug.cgi?id=240181
+
+        Reviewed by Yusuke Suzuki.
+
+        The progress will appear as something like [42/245669].
+
+        * Scripts/test262/Runner.pm:
+        (processCLI):
+        (main):
+
 2022-05-08  Antti Koivisto  <[email protected]>
 
         Avoid resolving style for elements that only inherit changes from parent

Modified: trunk/Tools/Scripts/test262/Runner.pm (293972 => 293973)


--- trunk/Tools/Scripts/test262/Runner.pm	2022-05-09 14:05:21 UTC (rev 293972)
+++ trunk/Tools/Scripts/test262/Runner.pm	2022-05-09 14:46:18 UTC (rev 293973)
@@ -132,6 +132,7 @@
 my $runningAllTests;
 my $timeout;
 my $skippedOnly;
+my $noProgress;
 
 my $test262Dir;
 my $webkitTest262Dir = abs_path("$Bin/../../../JSTests/test262");
@@ -176,7 +177,7 @@
         'f|features=s@' => \@features,
         'c|config=s' => \$configFile,
         'i|ignore-config' => \$ignoreConfig,
-        's|save' => \$saveExpectations,
+        'save' => \$saveExpectations,
         'e|expectations=s' => \$specifiedExpectationsFile,
         'x|ignore-expectations' => \$ignoreExpectations,
         'F|failing-files' => \$failingOnly,
@@ -185,6 +186,7 @@
         'r|results=s' => \$specifiedResultsFile,
         'timeout=i' => \$timeout,
         'S|skipped-files' => \$skippedOnly,
+        'no-progress' => \$noProgress,
     );
 
     if ($help) {
@@ -355,6 +357,9 @@
         }
     }
 
+    my $numFiles = scalar(@files);
+    my $completedFiles = 0;
+
     my $pm = Parallel::ForkManager->new($maxProcesses);
     my $select = IO::Select->new();
 
@@ -423,8 +428,12 @@
             $activeChildren--;
             my $file = shift @files;
             if ($file) {
+                $completedFiles++;
                 chomp $file;
                 print $readyChild "$file\n";
+                if (!$noProgress) {
+                    print "[$completedFiles/$numFiles]\r";
+                }
                 $activeChildren++;
             } elsif (!$activeChildren) {
                 last FILES;
@@ -1338,7 +1347,7 @@
 
 Specify one or more specific test262 directory of test to run, relative to the root test262 directory. For example, --test-only 'test/built-ins/Number/prototype'
 
-=item B<--save, -s>
+=item B<--save>
 
 Overwrites the test262-expectations.yaml file with the current list of test262 files and test results.
 
@@ -1366,6 +1375,10 @@
 
 Calculate conformance statistics from results/results.yaml file or a supplied results file (--results). Saves results in results/summary.txt and results/summary.yaml.
 
+=item B<--no-progress>
+
+Don't show progress while running tests.
+
 =item B<--results, -r>
 
 Specifies a results file for the --stats or --failing-files options.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to