Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1584)

Unified Diff: Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

Issue 23135008: Modify the rebaselining logic to handle skipped tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
index 6e9811827801e54c61fb5af40ea6c49d3e1b210a..f49a503fa502b342bf2beb7b8a9af182185b4a79 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -93,7 +93,7 @@ class _BaseTestCase(unittest.TestCase):
class TestCopyExistingBaselinesInternal(_BaseTestCase):
- command_constructor = CopyExistingBaselinesInternal # AKA webkit-patch rebaseline-test-internal
+ command_constructor = CopyExistingBaselinesInternal
def setUp(self):
super(TestCopyExistingBaselinesInternal, self).setUp()
@@ -181,6 +181,37 @@ class TestCopyExistingBaselinesInternal(_BaseTestCase):
self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/mac-leopard/userscripts/another-test-expected.txt')))
self.assertMultiLineEqual(out, '{"add": [], "remove-lines": []}\n')
+ def test_no_copy_skipped_test(self):
+ self.tool.executive = MockExecutive2()
+
+ port = self.tool.port_factory.get('test-win-win7')
+ fs = self.tool.filesystem
+ self._write(fs.join(port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/image-expected.txt'), 'original win7 result')
+ expectations_path = fs.join(port.path_to_generic_test_expectations_file())
+ self._write(expectations_path, (
+ "[ Win ] failures/expected/image.html [ Failure ]\n"
+ "[ Linux ] failures/expected/image.html [ Skip ]\n"))
+ old_exact_matches = builders._exact_matches
+ oc = OutputCapture()
+ try:
+ builders._exact_matches = {
+ "MOCK Linux": {"port_name": "test-linux-x86_64", "specifiers": set(["mock-specifier"])},
+ "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
+ "MOCK Win7": {"port_name": "test-win-win7", "specifiers": set(["mock-specifier"])},
+ }
+
+ options = MockOptions(builder="MOCK Win7", suffixes="txt", verbose=True, test="failures/expected/image.html", results_directory=None)
+
+ oc.capture_output()
+ self.command.execute(options, [], self.tool)
+ finally:
+ out, _, _ = oc.restore_output()
+ builders._exact_matches = old_exact_matches
+
+ self.assertFalse(fs.exists(fs.join(port.layout_tests_dir(), 'platform/test-linux-x86_64/failures/expected/image-expected.txt')))
+ self.assertEqual(self._read(fs.join(port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/image-expected.txt')),
+ 'original win7 result')
+
class TestRebaselineTest(_BaseTestCase):
command_constructor = RebaselineTest # AKA webkit-patch rebaseline-test-internal

Powered by Google App Engine
This is Rietveld 408576698