webkitpy: Print abbreviated baseline search path that includes only folders that...
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Jan 2019 22:25:33 +0000 (22:25 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Jan 2019 22:25:33 +0000 (22:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193352
<rdar://problem/47210736>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_config): Print list on only baseline search paths which exist.
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(Testprinter.test_print_config):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239874 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/views/printing.py
Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py

index e4d8319..08ecabc 100644 (file)
@@ -1,3 +1,16 @@
+2019-01-11  Jonathan Bedard  <jbedard@apple.com>
+
+        webkitpy: Print abbreviated baseline search path that includes only folders that exist
+        https://bugs.webkit.org/show_bug.cgi?id=193352
+        <rdar://problem/47210736>
+
+        Reviewed by Lucas Forschler.
+
+        * Scripts/webkitpy/layout_tests/views/printing.py:
+        (Printer.print_config): Print list on only baseline search paths which exist. 
+        * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+        (Testprinter.test_print_config):
+
 2019-01-11  Joseph Pecoraro  <pecoraro@apple.com>
 
         Cleanup possible WK*Copy/Create leaks in WebKitTestRunner
index 8f5067b..4e64c7d 100644 (file)
@@ -82,8 +82,14 @@ class Printer(object):
             self._print_default("Placing new baselines in %s" % self._port.baseline_path())
 
         fs = self._port.host.filesystem
-        fallback_path = [fs.relpath(x, self._port.layout_tests_dir()).replace("../", "") for x in self._port.baseline_search_path()]
-        self._print_default("Baseline search path: %s -> generic" % " -> ".join(fallback_path))
+        full_baseline_search_path = self._port.baseline_search_path()
+        normalize_baseline = lambda baseline_search_path: [fs.relpath(x, self._port.layout_tests_dir()).replace("../", "") for x in baseline_search_path]
+
+        self._print_default('Verbose baseline search path: {} -> generic'.format(' -> '.join(normalize_baseline(full_baseline_search_path))))
+
+        self._print_default('')
+        self._print_default('Baseline search path: {} -> generic'.format(' -> '.join(normalize_baseline([path for path in full_baseline_search_path if fs.exists(path)]))))
+        self._print_default('')
 
         self._print_default("Using %s build" % self._options.configuration)
         if self._options.pixel_tests:
index 1888692..9af5233 100644 (file)
@@ -111,7 +111,8 @@ class  Testprinter(unittest.TestCase):
         self.assertIn("Using port 'test-mac-leopard'", err.getvalue())
         self.assertIn('Test configuration: <leopard, x86, release>', err.getvalue())
         self.assertIn('Placing test results in /tmp', err.getvalue())
-        self.assertIn('Baseline search path: platform/test-mac-leopard -> platform/test-mac-snowleopard -> generic', err.getvalue())
+        self.assertIn('Verbose baseline search path: platform/test-mac-leopard -> platform/test-mac-snowleopard -> generic', err.getvalue())
+        self.assertIn('Baseline search path: platform/test-mac-leopard -> generic', err.getvalue())
         self.assertIn('Using Release build', err.getvalue())
         self.assertIn('Pixel tests enabled', err.getvalue())
         self.assertIn('Command line:', err.getvalue())