Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py (92831 => 92832)
--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py 2011-08-11 08:48:39 UTC (rev 92831)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py 2011-08-11 08:54:12 UTC (rev 92832)
@@ -149,17 +149,19 @@
# FIXME: Support non-Chromium ports.
return port_name.startswith('chromium-')
- def _update_expectations_file(self, port, expectations, tests_to_rebaseline):
- new_expectations = expectations.remove_rebaselined_tests(tests_to_rebaseline)
+ def _expectations(self, port):
+ return TestExpectations(port, None, port.test_expectations(), port.test_configuration())
+
+ def _update_expectations_file(self, port_name):
+ if not self._is_supported_port(port_name):
+ return
+ port = factory.get(port_name)
+ expectations = self._expectations(port)
path = port.path_to_test_expectations_file()
- self._tool.filesystem.write_text_file(path, new_expectations)
+ self._tool.filesystem.write_text_file(path, expectations.remove_rebaselined_tests(expectations.get_rebaselining_failures()))
- # FIXME: We read and write the test_expectations.txt file once for each port. That seems excessive.
def _tests_to_rebaseline(self, port):
- expectations = TestExpectations(port, None, port.test_expectations(), port.test_configuration())
- tests_to_rebaseline = expectations.get_rebaselining_failures()
- self._update_expectations_file(port, expectations, tests_to_rebaseline)
- return tests_to_rebaseline
+ return self._expectations(port).get_rebaselining_failures()
def _rebaseline_port(self, port_name):
if not self._is_supported_port(port_name):
@@ -177,6 +179,8 @@
self._touched_test_names = set([])
for port_name in factory.all_port_names():
self._rebaseline_port(port_name)
+ for port_name in factory.all_port_names():
+ self._update_expectations_file(port_name)
for test_name in self._touched_test_names:
print "Optimizing baselines for %s." % test_name
self._run_webkit_patch(['optimize-baselines', test_name])
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py (92831 => 92832)
--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py 2011-08-11 08:48:39 UTC (rev 92831)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py 2011-08-11 08:54:12 UTC (rev 92832)
@@ -59,13 +59,13 @@
Retrieving results for chromium-linux-x86 from Webkit Linux 32.
userscripts/another-test.html
userscripts/images.svg
-Retrieving results for chromium-linux-x86_64 from Webkit Linux (dbg)(2).
+Retrieving results for chromium-linux-x86_64 from Webkit Linux.
userscripts/another-test.html
userscripts/images.svg
-Retrieving results for chromium-mac-leopard from Webkit Mac10.5 (dbg)(1).
+Retrieving results for chromium-mac-leopard from Webkit Mac10.5.
userscripts/another-test.html
userscripts/images.svg
-Retrieving results for chromium-mac-snowleopard from Webkit Mac10.6 (dbg).
+Retrieving results for chromium-mac-snowleopard from Webkit Mac10.6.
userscripts/another-test.html
userscripts/images.svg
Retrieving results for chromium-win-vista from Webkit Vista.
@@ -74,7 +74,7 @@
Retrieving results for chromium-win-win7 from Webkit Win7.
userscripts/another-test.html
userscripts/images.svg
-Retrieving results for chromium-win-xp from Webkit Win (dbg)(2).
+Retrieving results for chromium-win-xp from Webkit Win.
userscripts/another-test.html
userscripts/images.svg
Optimizing baselines for userscripts/another-test.html.
@@ -82,18 +82,18 @@
"""
expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux 32', 'userscripts/another-test.html'], cwd=/mock-checkout
MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux 32', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux (dbg)(2)', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux (dbg)(2)', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.5 (dbg)(1)', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.5 (dbg)(1)', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.6 (dbg)', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.6 (dbg)', 'userscripts/images.svg'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux', 'userscripts/another-test.html'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux', 'userscripts/images.svg'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.5', 'userscripts/another-test.html'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.5', 'userscripts/images.svg'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.6', 'userscripts/another-test.html'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.6', 'userscripts/images.svg'], cwd=/mock-checkout
MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Vista', 'userscripts/another-test.html'], cwd=/mock-checkout
MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Vista', 'userscripts/images.svg'], cwd=/mock-checkout
MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Win7', 'userscripts/another-test.html'], cwd=/mock-checkout
MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Win7', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Win (dbg)(2)', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Win (dbg)(2)', 'userscripts/images.svg'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Win', 'userscripts/another-test.html'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Win', 'userscripts/images.svg'], cwd=/mock-checkout
MOCK run_command: ['echo', 'optimize-baselines', 'userscripts/another-test.html'], cwd=/mock-checkout
MOCK run_command: ['echo', 'optimize-baselines', 'userscripts/images.svg'], cwd=/mock-checkout
"""