| Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline_unittest.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline_unittest.py
|
| index 98f9d71a5ce2325df3b57d8c2ac90fa584ffb382..0349ea15b6425a1b1d1f4d524eadcc6ea4cd45df 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline_unittest.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline_unittest.py
|
| @@ -44,7 +44,7 @@ class TestAutoRebaseline(BaseTestCase):
|
| "MOCK Win7 (dbg)": {"port_name": "test-win-win7", "specifiers": ["Win7", "Debug"]},
|
| })
|
| self.command.latest_revision_processed_on_all_bots = lambda: 9000
|
| - self.command.bot_revision_data = lambda scm: [{"builder": "MOCK Win7", "revision": "9000"}]
|
| + self.command.bot_revision_data = lambda git: [{"builder": "MOCK Win7", "revision": "9000"}]
|
|
|
| def test_release_builders(self):
|
| # Testing private method - pylint: disable=protected-access
|
| @@ -66,7 +66,7 @@ class TestAutoRebaseline(BaseTestCase):
|
| 624caaaaaa path/to/TestExpectations (<foo@chromium.org> 2013-04-28 04:52:41 +0000 12) crbug.com/24182 path/to/not-cycled-through-bots.html [ NeedsRebaseline ]
|
| 0000000000 path/to/TestExpectations (<foo@chromium.org@@bbb929c8-8fbe-4397-9dbb-9b2b20218538> 2013-04-28 04:52:41 +0000 12) crbug.com/24182 path/to/locally-changed-lined.html [ NeedsRebaseline ]
|
| """
|
| - self.tool.scm().blame = blame
|
| + self.tool.git().blame = blame
|
|
|
| min_revision = 9000
|
| self.assertEqual(self.command.tests_to_rebaseline(self.tool, min_revision, print_revisions=False), (
|
| @@ -86,7 +86,7 @@ class TestAutoRebaseline(BaseTestCase):
|
| "(<foobarbaz1@chromium.org> 2013-04-28 04:52:41 +0000 13) "
|
| "crbug.com/24182 path/to/rebaseline-%s.html [ NeedsRebaseline ]\n" % i)
|
| return result
|
| - self.tool.scm().blame = blame
|
| + self.tool.git().blame = blame
|
|
|
| expected_list_of_tests = []
|
| for i in range(0, self.command.MAX_LINES_TO_REBASELINE):
|
| @@ -133,7 +133,7 @@ class TestAutoRebaseline(BaseTestCase):
|
| return """
|
| 6469e754a1 path/to/TestExpectations (<foobarbaz1@chromium.org> 2013-06-14 20:18:46 +0000 11) crbug.com/24182 [ Debug ] path/to/norebaseline.html [ Failure ]
|
| """
|
| - self.tool.scm().blame = blame
|
| + self.tool.git().blame = blame
|
|
|
| self._execute_with_mock_options()
|
| self.assertEqual(self.tool.executive.calls, [])
|
| @@ -149,7 +149,7 @@ class TestAutoRebaseline(BaseTestCase):
|
| 624caaaaaa path/to/TestExpectations (<foo@chromium.org> 2013-04-28 04:52:41 +0000 12) crbug.com/24182 path/to/not-cycled-through-bots.html [ NeedsRebaseline ]
|
| 0000000000 path/to/TestExpectations (<foo@chromium.org> 2013-04-28 04:52:41 +0000 12) crbug.com/24182 path/to/locally-changed-lined.html [ NeedsRebaseline ]
|
| """
|
| - self.tool.scm().blame = blame
|
| + self.tool.git().blame = blame
|
|
|
| test_port = self.tool.port_factory.get('test')
|
|
|
| @@ -266,7 +266,7 @@ crbug.com/24182 path/to/locally-changed-lined.html [ NeedsRebaseline ]
|
| return """
|
| 6469e754a1 path/to/TestExpectations (<foobarbaz1@chromium.org> 2013-04-28 04:52:41 +0000 13) Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| """
|
| - self.tool.scm().blame = blame
|
| + self.tool.git().blame = blame
|
|
|
| test_port = self.tool.port_factory.get('test')
|
|
|
| @@ -315,7 +315,7 @@ Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| return """
|
| 6469e754a1 path/to/TestExpectations (<foobarbaz1@chromium.org> 2013-04-28 04:52:41 +0000 13) Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| """
|
| - self.tool.scm().blame = blame
|
| + self.tool.git().blame = blame
|
|
|
| test_port = self.tool.port_factory.get('test')
|
|
|
| @@ -367,7 +367,7 @@ Bug(foo) [ Linux Win ] fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| return """
|
| 6469e754a1 path/to/TestExpectations (<foobarbaz1@chromium.org> 2013-04-28 04:52:41 +0000 13) Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| """
|
| - self.tool.scm().blame = blame
|
| + self.tool.git().blame = blame
|
|
|
| test_port = self.tool.port_factory.get('test')
|
|
|
| @@ -396,10 +396,10 @@ Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| self.tool.builders = BuilderList({
|
| "MOCK Win7": {"port_name": "test-win-win7", "specifiers": ["Win7", "Release"]},
|
| })
|
| - old_branch_name = self.tool.scm().current_branch_or_ref
|
| + old_branch_name = self.tool.git().current_branch_or_ref
|
| try:
|
| self.command.tree_status = lambda: 'open'
|
| - self.tool.scm().current_branch_or_ref = lambda: 'auto-rebaseline-temporary-branch'
|
| + self.tool.git().current_branch_or_ref = lambda: 'auto-rebaseline-temporary-branch'
|
| self._execute_with_mock_options()
|
| self.assertEqual(self.tool.executive.calls, [
|
| ['git', 'cl', 'upload', '-f'],
|
| @@ -413,14 +413,14 @@ Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| Bug(foo) [ Linux Mac Win10 ] fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| """)
|
| finally:
|
| - self.tool.scm().current_branch_or_ref = old_branch_name
|
| + self.tool.git().current_branch_or_ref = old_branch_name
|
|
|
| def test_execute_stuck_on_alternate_rebaseline_branch(self):
|
| def blame(_):
|
| return """
|
| 6469e754a1 path/to/TestExpectations (<foobarbaz1@chromium.org> 2013-04-28 04:52:41 +0000 13) Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| """
|
| - self.tool.scm().blame = blame
|
| + self.tool.git().blame = blame
|
|
|
| test_port = self.tool.port_factory.get('test')
|
|
|
| @@ -449,10 +449,10 @@ Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| self.tool.builders = BuilderList({
|
| "MOCK Win7": {"port_name": "test-win-win7", "specifiers": ["Win7", "Release"]},
|
| })
|
| - old_branch_name = self.tool.scm().current_branch_or_ref
|
| + old_branch_name = self.tool.git().current_branch_or_ref
|
| try:
|
| self.command.tree_status = lambda: 'open'
|
| - self.tool.scm().current_branch_or_ref = lambda: 'auto-rebaseline-alt-temporary-branch'
|
| + self.tool.git().current_branch_or_ref = lambda: 'auto-rebaseline-alt-temporary-branch'
|
| self._execute_with_mock_options()
|
| self.assertEqual(self.tool.executive.calls, [
|
| ['git', 'cl', 'upload', '-f'],
|
| @@ -466,14 +466,14 @@ Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| Bug(foo) [ Linux Mac Win10 ] fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| """)
|
| finally:
|
| - self.tool.scm().current_branch_or_ref = old_branch_name
|
| + self.tool.git().current_branch_or_ref = old_branch_name
|
|
|
| def _basic_execute_test(self, expected_executive_calls, auth_refresh_token_json=None, commit_author=None, dry_run=False):
|
| def blame(_):
|
| return """
|
| 6469e754a1 path/to/TestExpectations (<foobarbaz1@chromium.org> 2013-04-28 04:52:41 +0000 13) Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
| """
|
| - self.tool.scm().blame = blame
|
| + self.tool.git().blame = blame
|
|
|
| test_port = self.tool.port_factory.get('test')
|
|
|
| @@ -529,10 +529,10 @@ Bug(foo) [ Linux Win ] fast/dom/prototype-taco.html [ NeedsRebaseline ]
|
|
|
| def test_execute_with_dry_run(self):
|
| self._basic_execute_test([], dry_run=True)
|
| - self.assertEqual(self.tool.scm().local_commits(), [])
|
| + self.assertEqual(self.tool.git().local_commits(), [])
|
|
|
| def test_bot_revision_data(self):
|
| self._setup_mock_build_data()
|
| self.assertEqual(
|
| - self.command.bot_revision_data(self.tool.scm()),
|
| + self.command.bot_revision_data(self.tool.git()),
|
| [{'builder': 'MOCK Win7', 'revision': '9000'}])
|
|
|