Title: [226711] trunk/Tools
Revision
226711
Author
[email protected]
Date
2018-01-10 06:44:53 -0800 (Wed, 10 Jan 2018)

Log Message

WebDriver: run-webdriver-tests doesn't handle test names with a '/' correctly
https://bugs.webkit.org/show_bug.cgi?id=181474

Reviewed by Carlos Alberto Lopez Perez.

We use os.path.basename() to get the subtest name. If the test name contains a slash we get part of the subtest
name as the name.

* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py:
(WebDriverTestRunnerW3C._subtest_name): Helper function to get the subtest name.
(WebDriverTestRunnerW3C.run): Use _subtest_name() instead of os.path.basename().

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (226710 => 226711)


--- trunk/Tools/ChangeLog	2018-01-10 12:29:21 UTC (rev 226710)
+++ trunk/Tools/ChangeLog	2018-01-10 14:44:53 UTC (rev 226711)
@@ -1,3 +1,17 @@
+2018-01-10  Carlos Garcia Campos  <[email protected]>
+
+        WebDriver: run-webdriver-tests doesn't handle test names with a '/' correctly
+        https://bugs.webkit.org/show_bug.cgi?id=181474
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        We use os.path.basename() to get the subtest name. If the test name contains a slash we get part of the subtest
+        name as the name.
+
+        * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py:
+        (WebDriverTestRunnerW3C._subtest_name): Helper function to get the subtest name.
+        (WebDriverTestRunnerW3C.run): Use _subtest_name() instead of os.path.basename().
+
 2018-01-09  Andy Estes  <[email protected]>
 
         [Xcode] Use the Apple Internal SDK if available when building ImageDiff

Modified: trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py (226710 => 226711)


--- trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py	2018-01-10 12:29:21 UTC (rev 226710)
+++ trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py	2018-01-10 14:44:53 UTC (rev 226711)
@@ -79,6 +79,10 @@
                 tests.append(path)
         return tests
 
+    def _subtest_name(self, subtest):
+        path, test = subtest.split('::', 1)
+        return os.path.basename(path) + '::' + test
+
     def run(self, tests=[]):
         self._server.start()
 
@@ -92,7 +96,7 @@
                 result = WebDriverTestResult(test_name, *harness_result)
                 if harness_result[0] == 'OK':
                     for subtest, status, message, backtrace in test_results:
-                        result.add_subtest_results(os.path.basename(subtest), status, message, backtrace)
+                        result.add_subtest_results(self._subtest_name(subtest), status, message, backtrace)
                 else:
                     # FIXME: handle other results.
                     pass
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to