| 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 optparse | 5 import optparse |
| 6 | 6 |
| 7 from webkitpy.common.net.buildbot import Build | 7 from webkitpy.common.net.buildbot import Build |
| 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.layout_tests.builder_list import BuilderList | 10 from webkitpy.layout_tests.builder_list import BuilderList |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 ['python', 'echo', 'copy-existing-baselines-internal', '--suffix
es', 'txt', | 229 ['python', 'echo', 'copy-existing-baselines-internal', '--suffix
es', 'txt', |
| 230 '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-tac
o.html'], | 230 '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-tac
o.html'], |
| 231 ], | 231 ], |
| 232 [ | 232 [ |
| 233 ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'pn
g', | 233 ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'pn
g', |
| 234 '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-str
awberry.html'], | 234 '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-str
awberry.html'], |
| 235 ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'tx
t', | 235 ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'tx
t', |
| 236 '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-tac
o.html'], | 236 '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-tac
o.html'], |
| 237 ], | 237 ], |
| 238 [ | 238 [ |
| 239 ['python', 'echo', 'optimize-baselines', '--no-modify-scm', | 239 ['python', 'echo', 'optimize-baselines', |
| 240 '--suffixes', 'png', 'fast/dom/prototype-strawberry.html'], | 240 '--suffixes', 'png', 'fast/dom/prototype-strawberry.html'], |
| 241 ['python', 'echo', 'optimize-baselines', '--no-modify-scm', | 241 ['python', 'echo', 'optimize-baselines', |
| 242 '--suffixes', 'txt', 'fast/dom/prototype-taco.html'], | 242 '--suffixes', 'txt', 'fast/dom/prototype-taco.html'], |
| 243 ], | 243 ], |
| 244 ['git', 'cl', 'upload', '-f'], | 244 ['git', 'cl', 'upload', '-f'], |
| 245 ['git', 'pull'], | 245 ['git', 'pull'], |
| 246 ['git', 'cl', 'land', '-f', '-v'], | 246 ['git', 'cl', 'land', '-f', '-v'], |
| 247 ['git', 'config', 'branch.auto-rebaseline-temporary-branch.rietveldi
ssue'], | 247 ['git', 'config', 'branch.auto-rebaseline-temporary-branch.rietveldi
ssue'], |
| 248 ]) | 248 ]) |
| 249 | 249 |
| 250 # The mac ports should both be removed since they're the only ones in bu
ilders._exact_matches. | 250 # The mac ports should both be removed since they're the only ones in bu
ilders._exact_matches. |
| 251 self.assertEqual(self.tool.filesystem.read_text_file(test_port.path_to_g
eneric_test_expectations_file()), """ | 251 self.assertEqual(self.tool.filesystem.read_text_file(test_port.path_to_g
eneric_test_expectations_file()), """ |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 self.command.tree_status = lambda: 'open' | 294 self.command.tree_status = lambda: 'open' |
| 295 self.tool.executive = MockExecutive() | 295 self.tool.executive = MockExecutive() |
| 296 self.tool.executive.calls = [] | 296 self.tool.executive.calls = [] |
| 297 self._execute_with_mock_options() | 297 self._execute_with_mock_options() |
| 298 | 298 |
| 299 self.assertEqual(self.tool.executive.calls, [ | 299 self.assertEqual(self.tool.executive.calls, [ |
| 300 [['python', 'echo', 'copy-existing-baselines-internal', '--suffixes'
, 'txt', | 300 [['python', 'echo', 'copy-existing-baselines-internal', '--suffixes'
, 'txt', |
| 301 '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-taco.h
tml']], | 301 '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-taco.h
tml']], |
| 302 [['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', | 302 [['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', |
| 303 '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-taco.h
tml']], | 303 '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-taco.h
tml']], |
| 304 [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--suff
ixes', 'txt', 'fast/dom/prototype-taco.html']], | 304 [['python', 'echo', 'optimize-baselines', '--suffixes', 'txt', 'fast
/dom/prototype-taco.html']], |
| 305 ['git', 'cl', 'upload', '-f'], | 305 ['git', 'cl', 'upload', '-f'], |
| 306 ]) | 306 ]) |
| 307 | 307 |
| 308 def test_execute_test_passes_everywhere(self): | 308 def test_execute_test_passes_everywhere(self): |
| 309 def blame(_): | 309 def blame(_): |
| 310 return """ | 310 return """ |
| 311 6469e754a1 path/to/TestExpectations (<foobarbaz1@chromium.org>
2013-04-28 04:52:41 +0000 13) Bug(foo) fast/dom/prototype-taco.html [ NeedsRe
baseline ] | 311 6469e754a1 path/to/TestExpectations (<foobarbaz1@chromium.org>
2013-04-28 04:52:41 +0000 13) Bug(foo) fast/dom/prototype-taco.html [ NeedsRe
baseline ] |
| 312 """ | 312 """ |
| 313 self.tool.scm().blame = blame | 313 self.tool.scm().blame = blame |
| 314 | 314 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 | 520 |
| 521 def test_execute_with_dry_run(self): | 521 def test_execute_with_dry_run(self): |
| 522 self._basic_execute_test([], dry_run=True) | 522 self._basic_execute_test([], dry_run=True) |
| 523 self.assertEqual(self.tool.scm().local_commits(), []) | 523 self.assertEqual(self.tool.scm().local_commits(), []) |
| 524 | 524 |
| 525 def test_bot_revision_data(self): | 525 def test_bot_revision_data(self): |
| 526 self._setup_mock_build_data() | 526 self._setup_mock_build_data() |
| 527 self.assertEqual( | 527 self.assertEqual( |
| 528 self.command.bot_revision_data(self.tool.scm()), | 528 self.command.bot_revision_data(self.tool.scm()), |
| 529 [{'builder': 'MOCK Win7', 'revision': '9000'}]) | 529 [{'builder': 'MOCK Win7', 'revision': '9000'}]) |
| OLD | NEW |