Title: [119605] trunk/Tools
- Revision
- 119605
- Author
- [email protected]
- Date
- 2012-06-06 13:12:04 -0700 (Wed, 06 Jun 2012)
Log Message
REGRESSION(r117789): "webkit-patch rebaseline-expectations" copies contents in skia_test_expectations.txt into test_expectations.txt
https://bugs.webkit.org/show_bug.cgi?id=87406
Reviewed by Dirk Pranke.
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectations.__init__):
* Scripts/webkitpy/tool/commands/rebaseline.py:
(RebaselineTest._update_expectations_file):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(test_rebaseline_does_not_include_overrides):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (119604 => 119605)
--- trunk/Tools/ChangeLog 2012-06-06 19:57:26 UTC (rev 119604)
+++ trunk/Tools/ChangeLog 2012-06-06 20:12:04 UTC (rev 119605)
@@ -1,3 +1,17 @@
+2012-06-06 Ryosuke Niwa <[email protected]>
+
+ REGRESSION(r117789): "webkit-patch rebaseline-expectations" copies contents in skia_test_expectations.txt into test_expectations.txt
+ https://bugs.webkit.org/show_bug.cgi?id=87406
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectations.__init__):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (RebaselineTest._update_expectations_file):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (test_rebaseline_does_not_include_overrides):
+
2012-06-06 Dirk Pranke <[email protected]>
webkitpy: perf tests unit tests fail on chromium win
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py (119604 => 119605)
--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2012-06-06 19:57:26 UTC (rev 119604)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2012-06-06 20:12:04 UTC (rev 119605)
@@ -720,7 +720,7 @@
assert(' ' not in string) # This only handles one expectation at a time.
return cls.EXPECTATIONS.get(string.lower())
- def __init__(self, port, tests=None, is_lint_mode=False):
+ def __init__(self, port, tests=None, is_lint_mode=False, include_overrides=True):
self._full_test_list = tests
self._test_config = port.test_configuration()
self._is_lint_mode = is_lint_mode
@@ -733,7 +733,7 @@
self._add_expectations(self._expectations, in_overrides=False)
overrides = port.test_expectations_overrides()
- if overrides:
+ if overrides and include_overrides:
overrides_expectations = self._parser.parse(overrides)
self._add_expectations(overrides_expectations, in_overrides=True)
self._expectations += overrides_expectations
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py (119604 => 119605)
--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py 2012-06-06 19:57:26 UTC (rev 119604)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py 2012-06-06 20:12:04 UTC (rev 119605)
@@ -140,7 +140,7 @@
def _update_expectations_file(self, builder_name, test_name):
port = self._tool.port_factory.get_from_builder_name(builder_name)
- expectations = TestExpectations(port)
+ expectations = TestExpectations(port, include_overrides=False)
for test_configuration in port.all_test_configurations():
if test_configuration.version == port.test_configuration().version:
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py (119604 => 119605)
--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py 2012-06-06 19:57:26 UTC (rev 119604)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py 2012-06-06 20:12:04 UTC (rev 119605)
@@ -84,6 +84,25 @@
new_expectations = tool.filesystem.read_text_file(lion_port.path_to_test_expectations_file())
self.assertEqual(new_expectations, "BUGX LEOPARD SNOWLEOPARD : userscripts/another-test.html = IMAGE\nBUGZ LINUX : userscripts/another-test.html = IMAGE\n")
+ def test_rebaseline_does_not_include_overrides(self):
+ command = RebaselineTest()
+ tool = MockTool()
+ command.bind_to_tool(tool)
+
+ lion_port = tool.port_factory.get_from_builder_name("Webkit Mac10.7")
+ tool.filesystem.write_text_file(lion_port.path_to_test_expectations_file(), "BUGX MAC : userscripts/another-test.html = IMAGE\nBUGZ LINUX : userscripts/another-test.html = IMAGE\n")
+ tool.filesystem.write_text_file(lion_port.path_from_chromium_base('skia', 'skia_test_expectations.txt'), "BUGY MAC : other-test.html = TEXT\n")
+ tool.filesystem.write_text_file(os.path.join(lion_port.layout_tests_dir(), "userscripts/another-test.html"), "Dummy test contents")
+
+ expected_logs = """Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.png.
+Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.wav.
+Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.txt.
+"""
+ OutputCapture().assert_outputs(self, command._rebaseline_test_and_update_expectations, ["Webkit Mac10.7", "userscripts/another-test.html", None], expected_logs=expected_logs)
+
+ new_expectations = tool.filesystem.read_text_file(lion_port.path_to_test_expectations_file())
+ self.assertEqual(new_expectations, "BUGX LEOPARD SNOWLEOPARD : userscripts/another-test.html = IMAGE\nBUGZ LINUX : userscripts/another-test.html = IMAGE\n")
+
def test_rebaseline_test(self):
command = RebaselineTest()
command.bind_to_tool(MockTool())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes