Title: [295412] trunk/Tools/Scripts/test262/Runner.pm
Revision
295412
Author
ross.kirsl...@sony.com
Date
2022-06-08 23:45:52 -0700 (Wed, 08 Jun 2022)

Log Message

test262-runner should compare slashes correctly on Windows
https://bugs.webkit.org/show_bug.cgi?id=241441

Reviewed by Mark Lam.

test262-runner was unable to detect skips and expected failures on Windows due to backslashes in paths.
This patch adds normalization when comparing against config.yaml and expectations.yaml.

* Tools/Scripts/test262/Runner.pm:

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

Modified Paths

Diff

Modified: trunk/Tools/Scripts/test262/Runner.pm (295411 => 295412)


--- trunk/Tools/Scripts/test262/Runner.pm	2022-06-09 05:15:13 UTC (rev 295411)
+++ trunk/Tools/Scripts/test262/Runner.pm	2022-06-09 06:45:52 UTC (rev 295412)
@@ -470,9 +470,12 @@
     # Create expectation file and calculate results
     foreach my $test (@results) {
 
+        my $path = $test->{path};
+        $path =~ tr|\\|/| if (isWindows());
+
         my $expectedFailure = 0;
-        if ($expect && $expect->{$test->{path}}) {
-            $expectedFailure = $expect->{$test->{path}}->{$test->{mode}}
+        if ($expect && $expect->{$path}) {
+            $expectedFailure = $expect->{$path}->{$test->{mode}};
         }
 
         if ($test->{result} eq 'FAIL') {
@@ -486,7 +489,6 @@
                 $newfailcount++;
 
                 if ($verbose) {
-                    my $path = $test->{path};
                     my $mode = $test->{mode};
                     # Print full output from JSC
                     my $err = $test->{output};
@@ -711,6 +713,8 @@
     my ($filename, $data) = @_;
 
     if (exists $config->{skip}) {
+        $filename =~ tr|\\|/| if (isWindows());
+
         # Filter by file
         if( $configSkipHash{$filename} ) {
             return 1;
@@ -833,6 +837,8 @@
 
     # Report a relative path
     my $file = abs2rel( $path, $test262Dir );
+    $file =~ tr|\\|/| if (isWindows());
+
     my %resultdata;
     $resultdata{path} = $file;
     $resultdata{mode} = $scenario;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to