| 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
|
|
|