Fix a bug where optimize-baselines would incorrectly fail to optimize
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jul 2012 00:26:25 +0000 (00:26 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jul 2012 00:26:25 +0000 (00:26 +0000)
commitf318fe7d4f56d167f15c874c82f047cd3acf6a83
tree3684ecf52a64a5c53d5301fe765fffe51509a91e
parent1d42bbb48a1376d1da1d27a7efcdd757175516ee
Fix a bug where optimize-baselines would incorrectly fail to optimize
https://bugs.webkit.org/show_bug.cgi?id=91551

Reviewed by Adam Barth.

In some cases, optimize-baseline would correctly optimize the results, but because
we weren't filtering the virtual ports out of _results_by_port_name, we thought
that we had failed to optimize.

* Scripts/webkitpy/common/checkout/baselineoptimizer.py:
(BaselineOptimizer._find_optimal_result_placement): No virtual filtering here.
(BaselineOptimizer._filtered_results_by_port_name): New function that filters out virtual directories.
(BaselineOptimizer.optimize): Filter out virtual ports.
* Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
(TestBaselineOptimizer._move_baselines): Add a stub so we don't actual move results.
(BaselineOptimizerTest._assertOptimization): Call optimize and verify that the right files were moved.
(BaselineOptimizerTest._assertOptimizationFailed): Add a method for when optimization should fail.
(BaselineOptimizerTest.test_common_directory_includes_root): Update since this test should fail.
(BaselineOptimizerTest.test_virtual_ports_filtered): New test case that demonstrates the bug.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py
Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py