Title: [92562] trunk/Tools
Revision
92562
Author
[email protected]
Date
2011-08-06 15:17:24 -0700 (Sat, 06 Aug 2011)

Log Message

webkit-patch optimize-baselines can't handle promotions to base results directory
https://bugs.webkit.org/show_bug.cgi?id=65819

Reviewed by Dimitri Glazkov.

This bug came up when testing the optimizer on some editing baselines.

* Scripts/webkitpy/common/checkout/baselineoptimizer.py:
* Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (92561 => 92562)


--- trunk/Tools/ChangeLog	2011-08-06 22:04:24 UTC (rev 92561)
+++ trunk/Tools/ChangeLog	2011-08-06 22:17:24 UTC (rev 92562)
@@ -1,5 +1,17 @@
 2011-08-06  Adam Barth  <[email protected]>
 
+        webkit-patch optimize-baselines can't handle promotions to base results directory
+        https://bugs.webkit.org/show_bug.cgi?id=65819
+
+        Reviewed by Dimitri Glazkov.
+
+        This bug came up when testing the optimizer on some editing baselines.
+
+        * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
+        * Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
+
+2011-08-06  Adam Barth  <[email protected]>
+
         Add a small command to optimize baselines in bulk.
 
         * Scripts/webkitpy/tool/commands/rebaseline.py:

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py (92561 => 92562)


--- trunk/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py	2011-08-06 22:04:24 UTC (rev 92561)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py	2011-08-06 22:17:24 UTC (rev 92562)
@@ -36,15 +36,18 @@
 
     # These edges in the hypergraph aren't visible on build.webkit.org,
     # but they impose constraints on how we optimize baselines.
-    hypergraph['mac-future'] = ['LayoutTests/platform/mac-future', 'LayoutTests/platform/mac']
-    hypergraph['qt-unknown'] = ['LayoutTests/platform/qt-unknown', 'LayoutTests/platform/qt']
+    hypergraph['mac-future'] = ['LayoutTests/platform/mac-future', 'LayoutTests/platform/mac', 'LayoutTests']
+    hypergraph['qt-unknown'] = ['LayoutTests/platform/qt-unknown', 'LayoutTests/platform/qt', 'LayoutTests']
 
+    # FIXME: Should we get this constant from somewhere?
+    fallback_path = ['LayoutTests']
+
     for port_name in port_factory.all_port_names():
         port = port_factory.get(port_name)
         webkit_base = port.webkit_base()
         search_path = port.baseline_search_path()
         if search_path:
-            hypergraph[port_name] = [fs.relpath(path, webkit_base) for path in search_path]
+            hypergraph[port_name] = [fs.relpath(path, webkit_base) for path in search_path] + fallback_path
     return hypergraph
 
 

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py (92561 => 92562)


--- trunk/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py	2011-08-06 22:04:24 UTC (rev 92561)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py	2011-08-06 22:17:24 UTC (rev 92562)
@@ -89,6 +89,30 @@
             'LayoutTests/platform/qt': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
         })
 
+    def test_common_directory_includes_root(self):
+        # Note: The resulting directories are "wrong" in the sense that
+        # enacting this plan would change semantics. However, this test case
+        # demonstrates that we don't throw an exception in this case. :)
+        self._assertOptimization({
+            'LayoutTests/platform/gtk': 'e8608763f6241ddacdd5c1ef1973ba27177d0846',
+            'LayoutTests/platform/qt': 'bcbd457d545986b7abf1221655d722363079ac87',
+            'LayoutTests/platform/chromium-win': '3764ac11e1f9fbadd87a90a2e40278319190a0d3',
+            'LayoutTests/platform/mac': 'e8608763f6241ddacdd5c1ef1973ba27177d0846',
+        }, {
+            'LayoutTests/platform/qt': 'bcbd457d545986b7abf1221655d722363079ac87',
+            'LayoutTests/platform/chromium-win': '3764ac11e1f9fbadd87a90a2e40278319190a0d3',
+            'LayoutTests': 'e8608763f6241ddacdd5c1ef1973ba27177d0846',
+        })
+
+        self._assertOptimization({
+            'LayoutTests/platform/chromium-win': '23a30302a6910f8a48b1007fa36f3e3158341834',
+            'LayoutTests': '9c876f8c3e4cc2aef9519a6c1174eb3432591127',
+            'LayoutTests/platform/chromium-mac': '23a30302a6910f8a48b1007fa36f3e3158341834',
+        }, {
+            'LayoutTests/platform/chromium': '23a30302a6910f8a48b1007fa36f3e3158341834',
+            'LayoutTests': '9c876f8c3e4cc2aef9519a6c1174eb3432591127',
+        })
+
     def test_complex_shadowing(self):
         self._assertOptimization({
             'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to