| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import unittest | 5 import unittest |
| 6 | 6 |
| 7 from webkitpy.common.net.buildbot_mock import MockBuilder | 7 from webkitpy.common.net.buildbot_mock import MockBuilder |
| 8 from webkitpy.common.net.layouttestresults import LayoutTestResults | 8 from webkitpy.common.net.layouttestresults import LayoutTestResults |
| 9 from webkitpy.common.system.executive_mock import MockExecutive | 9 from webkitpy.common.system.executive_mock import MockExecutive |
| 10 from webkitpy.common.system.executive_mock import MockExecutive2 | 10 from webkitpy.common.system.executive_mock import MockExecutive2 |
| 11 from webkitpy.common.system.outputcapture import OutputCapture | 11 from webkitpy.common.system.outputcapture import OutputCapture |
| 12 from webkitpy.layout_tests.builder_list import BuilderList | 12 from webkitpy.layout_tests.builder_list import BuilderList |
| 13 from webkitpy.tool.commands.rebaseline import * | 13 from webkitpy.tool.commands.rebaseline import * |
| 14 from webkitpy.tool.mock_tool import MockTool, MockOptions | 14 from webkitpy.tool.mock_tool import MockWebKitPatch, MockOptions |
| 15 | 15 |
| 16 | 16 |
| 17 class BaseTestCase(unittest.TestCase): | 17 class BaseTestCase(unittest.TestCase): |
| 18 MOCK_WEB_RESULT = 'MOCK Web result, convert 404 to None=True' | 18 MOCK_WEB_RESULT = 'MOCK Web result, convert 404 to None=True' |
| 19 WEB_PREFIX = 'http://example.com/f/builders/MOCK Mac10.11/results/layout-tes
t-results' | 19 WEB_PREFIX = 'http://example.com/f/builders/MOCK Mac10.11/results/layout-tes
t-results' |
| 20 | 20 |
| 21 command_constructor = None | 21 command_constructor = None |
| 22 | 22 |
| 23 def setUp(self): | 23 def setUp(self): |
| 24 self.tool = MockTool() | 24 self.tool = MockWebKitPatch() |
| 25 # lint warns that command_constructor might not be set, but this is inte
ntional; pylint: disable=E1102 | 25 # lint warns that command_constructor might not be set, but this is inte
ntional; pylint: disable=E1102 |
| 26 self.command = self.command_constructor() | 26 self.command = self.command_constructor() |
| 27 self.tool.builders = BuilderList({ | 27 self.tool.builders = BuilderList({ |
| 28 "MOCK Mac10.10 (dbg)": {"port_name": "test-mac-mac10.10", "specifier
s": ["Mac10.10", "Debug"]}, | 28 "MOCK Mac10.10 (dbg)": {"port_name": "test-mac-mac10.10", "specifier
s": ["Mac10.10", "Debug"]}, |
| 29 "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": ["
Mac10.10", "Release"]}, | 29 "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": ["
Mac10.10", "Release"]}, |
| 30 "MOCK Mac10.11 (dbg)": {"port_name": "test-mac-mac10.11", "specifier
s": ["Mac10.11", "Debug"]}, | 30 "MOCK Mac10.11 (dbg)": {"port_name": "test-mac-mac10.11", "specifier
s": ["Mac10.11", "Debug"]}, |
| 31 "MOCK Mac10.11 ASAN": {"port_name": "test-mac-mac10.11", "specifiers
": ["Mac10.11", "Release"]}, | 31 "MOCK Mac10.11 ASAN": {"port_name": "test-mac-mac10.11", "specifiers
": ["Mac10.11", "Release"]}, |
| 32 "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": ["
Mac10.11", "Release"]}, | 32 "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": ["
Mac10.11", "Release"]}, |
| 33 "MOCK Precise": {"port_name": "test-linux-precise", "specifiers": ["
Precise", "Release"]}, | 33 "MOCK Precise": {"port_name": "test-linux-precise", "specifiers": ["
Precise", "Release"]}, |
| 34 "MOCK Trusty": {"port_name": "test-linux-trusty", "specifiers": ["Tr
usty", "Release"]}, | 34 "MOCK Trusty": {"port_name": "test-linux-trusty", "specifiers": ["Tr
usty", "Release"]}, |
| (...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 ['git', 'cl', 'upload', '-f', '--auth-refresh-token-json', RIETV
ELD_REFRESH_TOKEN], | 1430 ['git', 'cl', 'upload', '-f', '--auth-refresh-token-json', RIETV
ELD_REFRESH_TOKEN], |
| 1431 ['git', 'pull'], | 1431 ['git', 'pull'], |
| 1432 ['git', 'cl', 'land', '-f', '-v', '--auth-refresh-token-json', R
IETVELD_REFRESH_TOKEN], | 1432 ['git', 'cl', 'land', '-f', '-v', '--auth-refresh-token-json', R
IETVELD_REFRESH_TOKEN], |
| 1433 ['git', 'config', 'branch.auto-rebaseline-temporary-branch.rietv
eldissue'], | 1433 ['git', 'config', 'branch.auto-rebaseline-temporary-branch.rietv
eldissue'], |
| 1434 ], | 1434 ], |
| 1435 auth_refresh_token_json=RIETVELD_REFRESH_TOKEN) | 1435 auth_refresh_token_json=RIETVELD_REFRESH_TOKEN) |
| 1436 | 1436 |
| 1437 def test_execute_with_dry_run(self): | 1437 def test_execute_with_dry_run(self): |
| 1438 self._basic_execute_test([], dry_run=True) | 1438 self._basic_execute_test([], dry_run=True) |
| 1439 self.assertEqual(self.tool.scm().local_commits(), []) | 1439 self.assertEqual(self.tool.scm().local_commits(), []) |
| OLD | NEW |