add debug info, another test to webkit-patch optimize-baselines
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 00:59:54 +0000 (00:59 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 00:59:54 +0000 (00:59 +0000)
commit9b66a0a5992f6c36b36f23da88709a7e963ba5d7
tree8e837203c59c8d8bb3c945da790611653f10ebec
parentb95132436c0e72897096641d0d704e4aa8b8491d
add debug info, another test to webkit-patch optimize-baselines
https://bugs.webkit.org/show_bug.cgi?id=94762

Reviewed by Adam Barth.

This patch adds more debug logging for optimize-baselines so
that you can tell the before and after states and figure out
what the command is actually deciding to do.

Also, this command adds a (disabled) test for the problem in bug
94665. It's disabled because we don't have the fix yet (that
will be posted in a patch to that bug).

There should be no functional changes in this patch apart from
the additional logging.

Note that adding the debug logging exposed a bug in
filesystem_mock.relpath() (that would return None if the path
wasn't a subpath of the start); the real relpath computes a
relpath with parent dirs. Fixing this revealed a bad check in
the style checker's change_directory() call which was checking
for None.

* Scripts/webkitpy/common/checkout/baselineoptimizer.py:
(BaselineOptimizer._find_optimal_result_placement):
(BaselineOptimizer):
(BaselineOptimizer._optimize_by_most_specific_common_directory):
(BaselineOptimizer._move_baselines):
(BaselineOptimizer.optimize):
* Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
(BaselineOptimizerTest.disabled_test_platform_mac_different):
* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem):
* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem):
(MockFileSystem.__init__):
(MockFileSystem.relpath):
* Scripts/webkitpy/common/system/filesystem_unittest.py:
(RealFileSystemTest.test_sep):
* Scripts/webkitpy/style/main.py:
(change_directory):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py
Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
Tools/Scripts/webkitpy/common/system/filesystem.py
Tools/Scripts/webkitpy/common/system/filesystem_mock.py
Tools/Scripts/webkitpy/common/system/filesystem_unittest.py
Tools/Scripts/webkitpy/style/main.py