Title: [292464] trunk/Tools
Revision
292464
Author
[email protected]
Date
2022-04-06 07:33:22 -0700 (Wed, 06 Apr 2022)

Log Message

REGRESSION(r292308): links to results is wrong for some tests
https://bugs.webkit.org/show_bug.cgi?id=238862

Patch by Carlos Garcia Campos <[email protected]> on 2022-04-06
Reviewed by Youenn Fablet.

Since r292308 we generate the wrong links in the results for the tests that end with .https.html. This is because
the output_filename is expected to have the extension, that is removed before renturing the value. Since
r292308, the extension is removed first, so .https is considered the extension and removed too.

* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(TestResultWriter.output_filename):
* Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py:
(TestResultWriterTest.test_reftest_diff_image):
(TestResultWriterTest):
(TestResultWriterTest.test_output_filename):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (292463 => 292464)


--- trunk/Tools/ChangeLog	2022-04-06 14:19:18 UTC (rev 292463)
+++ trunk/Tools/ChangeLog	2022-04-06 14:33:22 UTC (rev 292464)
@@ -1,3 +1,21 @@
+2022-04-06  Carlos Garcia Campos  <[email protected]>
+
+        REGRESSION(r292308): links to results is wrong for some tests
+        https://bugs.webkit.org/show_bug.cgi?id=238862
+
+        Reviewed by Youenn Fablet.
+
+        Since r292308 we generate the wrong links in the results for the tests that end with .https.html. This is because
+        the output_filename is expected to have the extension, that is removed before renturing the value. Since
+        r292308, the extension is removed first, so .https is considered the extension and removed too.
+
+        * Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
+        (TestResultWriter.output_filename):
+        * Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py:
+        (TestResultWriterTest.test_reftest_diff_image):
+        (TestResultWriterTest):
+        (TestResultWriterTest.test_output_filename):
+
 2022-04-06  Youenn Fablet  <[email protected]>
 
         Implement ServiceWorkerWindowClient.navigate

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py (292463 => 292464)


--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py	2022-04-06 14:19:18 UTC (rev 292463)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py	2022-04-06 14:33:22 UTC (rev 292464)
@@ -105,7 +105,7 @@
         if len(ext_parts) > 1 and '#' in ext_parts[1]:
             output_basename += '_' + ext_parts[1].split('#')[1]
 
-        output_filename = fs.join(self._root_output_dir, output_basename)
+        output_filename = fs.join(self._root_output_dir, output_basename + ext_parts[1])
 
         # Temporary fix, also in LayoutTests/fast/harness/results.html, line 275.
         # FIXME: Refactor to avoid confusing reference to both test and process names.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py (292463 => 292464)


--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py	2022-04-06 14:19:18 UTC (rev 292463)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py	2022-04-06 14:33:22 UTC (rev 292464)
@@ -54,3 +54,10 @@
         test_result_writer.write_test_result(host.filesystem, ImageDiffTestPort(host), port.results_directory(), test_name,
                                              driver_output1, driver_output2, failures)
         self.assertEqual([0], used_tolerance_values)
+
+    def test_output_filename(self):
+        host = MockHost()
+        port = TestPort(host)
+        fs = host.filesystem
+        writer = test_result_writer.TestResultWriter(fs, port, port.results_directory(), 'require-corp-revalidated-images.https.html')
+        self.assertEqual(writer.output_filename('-diff.txt'), fs.join(port.results_directory(), 'require-corp-revalidated-images.https-diff.txt'))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to