| 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 json | 5 import json |
| 6 import optparse | 6 import optparse |
| 7 | 7 |
| 8 from webkitpy.common.net.buildbot import Build | 8 from webkitpy.common.net.buildbot import Build |
| 9 from webkitpy.common.net.rietveld import Rietveld | 9 from webkitpy.common.net.rietveld import Rietveld |
| 10 from webkitpy.common.net.web_mock import MockWeb | 10 from webkitpy.common.net.web_mock import MockWeb |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 Build('MOCK Try Win', 5000), None) | 162 Build('MOCK Try Win', 5000), None) |
| 163 self.command.execute(self.command_options(issue=11112222), [], self.tool
) | 163 self.command.execute(self.command_options(issue=11112222), [], self.tool
) |
| 164 self.assertLog([ | 164 self.assertLog([ |
| 165 'WARNING: No retry summary available for build Build(builder_name=u\
'MOCK Try Win\', build_number=5000).\n', | 165 'WARNING: No retry summary available for build Build(builder_name=u\
'MOCK Try Win\', build_number=5000).\n', |
| 166 'INFO: Rebaselining fast/dom/prototype-inheritance.html\n', | 166 'INFO: Rebaselining fast/dom/prototype-inheritance.html\n', |
| 167 'INFO: Rebaselining fast/dom/prototype-newtest.html\n', | 167 'INFO: Rebaselining fast/dom/prototype-newtest.html\n', |
| 168 'INFO: Rebaselining fast/dom/prototype-taco.html\n', | 168 'INFO: Rebaselining fast/dom/prototype-taco.html\n', |
| 169 'INFO: Rebaselining svg/dynamic-updates/SVGFEDropShadowElement-dom-s
tdDeviation-attr.html\n', | 169 'INFO: Rebaselining svg/dynamic-updates/SVGFEDropShadowElement-dom-s
tdDeviation-attr.html\n', |
| 170 ]) | 170 ]) |
| 171 | 171 |
| 172 def test_execute_with_nonexistent_test(self): | |
| 173 self.command.execute(self.command_options(issue=11112222), ['some/non/ex
istent/test.html'], self.tool) | |
| 174 self.assertLog([ | |
| 175 'WARNING: /test.checkout/LayoutTests/some/non/existent/test.html not
found, removing from list.\n', | |
| 176 'INFO: No tests to rebaseline; exiting.\n', | |
| 177 ]) | |
| 178 | |
| 179 def test_execute_with_trigger_jobs_option(self): | 172 def test_execute_with_trigger_jobs_option(self): |
| 180 self.command.execute(self.command_options(issue=11112222, trigger_jobs=T
rue), [], self.tool) | 173 self.command.execute(self.command_options(issue=11112222, trigger_jobs=T
rue), [], self.tool) |
| 181 self.assertLog([ | 174 self.assertLog([ |
| 182 'INFO: Triggering try jobs for:\n', | 175 'INFO: Triggering try jobs for:\n', |
| 183 'INFO: MOCK Try Linux\n', | 176 'INFO: MOCK Try Linux\n', |
| 184 'INFO: Please re-run webkit-patch rebaseline-cl once all pending try
jobs have finished.\n', | 177 'INFO: Please re-run webkit-patch rebaseline-cl once all pending try
jobs have finished.\n', |
| 185 ]) | 178 ]) |
| 186 self.assertEqual( | 179 self.assertEqual( |
| 187 self.tool.executive.calls, | 180 self.tool.executive.calls, |
| 188 [['git', 'cl', 'try', '-b', 'MOCK Try Linux']]) | 181 [['git', 'cl', 'try', '-b', 'MOCK Try Linux']]) |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 self.assertTrue(self.command.trigger_jobs_for_missing_builds([ | 231 self.assertTrue(self.command.trigger_jobs_for_missing_builds([ |
| 239 Build('MOCK Try Linux', None), | 232 Build('MOCK Try Linux', None), |
| 240 ])) | 233 ])) |
| 241 self.assertEqual(self.tool.executive.calls, [['git', 'cl', 'try', '-b',
'MOCK Try Win']]) | 234 self.assertEqual(self.tool.executive.calls, [['git', 'cl', 'try', '-b',
'MOCK Try Win']]) |
| 242 self.assertLog([ | 235 self.assertLog([ |
| 243 'INFO: There are existing pending builds for:\n', | 236 'INFO: There are existing pending builds for:\n', |
| 244 'INFO: MOCK Try Linux\n', | 237 'INFO: MOCK Try Linux\n', |
| 245 'INFO: Triggering try jobs for:\n', | 238 'INFO: Triggering try jobs for:\n', |
| 246 'INFO: MOCK Try Win\n', | 239 'INFO: MOCK Try Win\n', |
| 247 ]) | 240 ]) |
| OLD | NEW |