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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

Issue 2112133002: Greatly simplify buildbot module and remove usage of master name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_from_try_jobs_unittest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 'original win7 result') 216 'original win7 result')
217 217
218 218
219 class TestRebaselineTest(BaseTestCase): 219 class TestRebaselineTest(BaseTestCase):
220 command_constructor = RebaselineTest # AKA webkit-patch rebaseline-test-int ernal 220 command_constructor = RebaselineTest # AKA webkit-patch rebaseline-test-int ernal
221 221
222 def setUp(self): 222 def setUp(self):
223 super(TestRebaselineTest, self).setUp() 223 super(TestRebaselineTest, self).setUp()
224 self.options = MockOptions( 224 self.options = MockOptions(
225 builder="MOCK Mac10.11", test="userscripts/another-test.html", suffi xes="txt", results_directory=None, 225 builder="MOCK Mac10.11", test="userscripts/another-test.html", suffi xes="txt", results_directory=None,
226 master_name='chromium.mymaster', build_number=None) 226 build_number=None)
227 227
228 def test_baseline_directory(self): 228 def test_baseline_directory(self):
229 command = self.command 229 command = self.command
230 self.assertMultiLineEqual(command._baseline_directory("MOCK Mac10.11"), 230 self.assertMultiLineEqual(command._baseline_directory("MOCK Mac10.11"),
231 "/test.checkout/LayoutTests/platform/test-mac- mac10.11") 231 "/test.checkout/LayoutTests/platform/test-mac- mac10.11")
232 self.assertMultiLineEqual(command._baseline_directory("MOCK Mac10.10"), 232 self.assertMultiLineEqual(command._baseline_directory("MOCK Mac10.10"),
233 "/test.checkout/LayoutTests/platform/test-mac- mac10.10") 233 "/test.checkout/LayoutTests/platform/test-mac- mac10.10")
234 self.assertMultiLineEqual(command._baseline_directory("MOCK Trusty"), 234 self.assertMultiLineEqual(command._baseline_directory("MOCK Trusty"),
235 "/test.checkout/LayoutTests/platform/test-linu x-trusty") 235 "/test.checkout/LayoutTests/platform/test-linu x-trusty")
236 self.assertMultiLineEqual(command._baseline_directory("MOCK Precise"), 236 self.assertMultiLineEqual(command._baseline_directory("MOCK Precise"),
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 self.tool.executive = MockExecutive2() 293 self.tool.executive = MockExecutive2()
294 294
295 port = self.tool.port_factory.get('test-win-win7') 295 port = self.tool.port_factory.get('test-win-win7')
296 self._write(port._filesystem.join(port.layout_tests_dir(), 296 self._write(port._filesystem.join(port.layout_tests_dir(),
297 'platform/test-win-win10/failures/expe cted/image-expected.txt'), 'original win10 result') 297 'platform/test-win-win10/failures/expe cted/image-expected.txt'), 'original win10 result')
298 298
299 oc = OutputCapture() 299 oc = OutputCapture()
300 try: 300 try:
301 options = MockOptions( 301 options = MockOptions(
302 optimize=True, builder="MOCK Win10", suffixes="txt", verbose=Tru e, test="failures/expected/image.html", 302 optimize=True, builder="MOCK Win10", suffixes="txt", verbose=Tru e, test="failures/expected/image.html",
303 results_directory=None, master_name='chromium.mymaster', build_n umber=None) 303 results_directory=None, build_number=None)
304 304
305 oc.capture_output() 305 oc.capture_output()
306 self.command.execute(options, [], self.tool) 306 self.command.execute(options, [], self.tool)
307 finally: 307 finally:
308 out, _, _ = oc.restore_output() 308 out, _, _ = oc.restore_output()
309 309
310 self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layo ut_tests_dir( 310 self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layo ut_tests_dir(
311 ), 'platform/test-win-win10/failures/expected/image-expected.txt')), 'MO CK Web result, convert 404 to None=True') 311 ), 'platform/test-win-win10/failures/expected/image-expected.txt')), 'MO CK Web result, convert 404 to None=True')
312 self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join( 312 self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(
313 port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/i mage-expected.txt'))) 313 port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/i mage-expected.txt')))
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 ['git', 'cl', 'upload', '-f', '--auth-refresh-token-json', RIETV ELD_REFRESH_TOKEN], 1435 ['git', 'cl', 'upload', '-f', '--auth-refresh-token-json', RIETV ELD_REFRESH_TOKEN],
1436 ['git', 'pull'], 1436 ['git', 'pull'],
1437 ['git', 'cl', 'land', '-f', '-v', '--auth-refresh-token-json', R IETVELD_REFRESH_TOKEN], 1437 ['git', 'cl', 'land', '-f', '-v', '--auth-refresh-token-json', R IETVELD_REFRESH_TOKEN],
1438 ['git', 'config', 'branch.auto-rebaseline-temporary-branch.rietv eldissue'], 1438 ['git', 'config', 'branch.auto-rebaseline-temporary-branch.rietv eldissue'],
1439 ], 1439 ],
1440 auth_refresh_token_json=RIETVELD_REFRESH_TOKEN) 1440 auth_refresh_token_json=RIETVELD_REFRESH_TOKEN)
1441 1441
1442 def test_execute_with_dry_run(self): 1442 def test_execute_with_dry_run(self):
1443 self._basic_execute_test([], dry_run=True) 1443 self._basic_execute_test([], dry_run=True)
1444 self.assertEqual(self.tool.scm().local_commits(), []) 1444 self.assertEqual(self.tool.scm().local_commits(), [])
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_from_try_jobs_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698