| 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.git_cl import GitCL | 9 from webkitpy.common.net.git_cl import GitCL |
| 10 from webkitpy.common.net.rietveld import Rietveld | 10 from webkitpy.common.net.rietveld import Rietveld |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 }, | 44 }, |
| 45 }), | 45 }), |
| 46 }) | 46 }) |
| 47 self.tool.builders = BuilderList({ | 47 self.tool.builders = BuilderList({ |
| 48 "MOCK Try Win": { | 48 "MOCK Try Win": { |
| 49 "port_name": "test-win-win7", | 49 "port_name": "test-win-win7", |
| 50 "specifiers": ["Win7", "Release"], | 50 "specifiers": ["Win7", "Release"], |
| 51 "is_try_builder": True, | 51 "is_try_builder": True, |
| 52 }, | 52 }, |
| 53 "MOCK Try Linux": { | 53 "MOCK Try Linux": { |
| 54 "port_name": "test-mac-mac10.10", | 54 "port_name": "test-linux-trusty", |
| 55 "specifiers": ["Mac10.10", "Release"], | 55 "specifiers": ["Trusty", "Release"], |
| 56 "is_try_builder": True, | 56 "is_try_builder": True, |
| 57 }, | 57 }, |
| 58 }) | 58 }) |
| 59 self.command.rietveld = Rietveld(web) | 59 self.command.rietveld = Rietveld(web) |
| 60 | 60 |
| 61 self.tool.buildbot.set_retry_sumary_json(Build('MOCK Try Win', 5000), js
on.dumps({ | 61 self.tool.buildbot.set_retry_sumary_json(Build('MOCK Try Win', 5000), js
on.dumps({ |
| 62 'failures': [ | 62 'failures': [ |
| 63 'fast/dom/prototype-newtest.html', | 63 'fast/dom/prototype-newtest.html', |
| 64 'fast/dom/prototype-taco.html', | 64 'fast/dom/prototype-taco.html', |
| 65 'fast/dom/prototype-inheritance.html', | 65 'fast/dom/prototype-inheritance.html', |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 self.assertTrue(self.command.trigger_jobs_for_missing_builds([ | 230 self.assertTrue(self.command.trigger_jobs_for_missing_builds([ |
| 231 Build('MOCK Try Linux', None), | 231 Build('MOCK Try Linux', None), |
| 232 ])) | 232 ])) |
| 233 self.assertEqual(self.tool.executive.calls, [['git', 'cl', 'try', '-b',
'MOCK Try Win']]) | 233 self.assertEqual(self.tool.executive.calls, [['git', 'cl', 'try', '-b',
'MOCK Try Win']]) |
| 234 self.assertLog([ | 234 self.assertLog([ |
| 235 'INFO: There are existing pending builds for:\n', | 235 'INFO: There are existing pending builds for:\n', |
| 236 'INFO: MOCK Try Linux\n', | 236 'INFO: MOCK Try Linux\n', |
| 237 'INFO: Triggering try jobs for:\n', | 237 'INFO: Triggering try jobs for:\n', |
| 238 'INFO: MOCK Try Win\n', | 238 'INFO: MOCK Try Win\n', |
| 239 ]) | 239 ]) |
| 240 |
| 241 def test_bails_when_one_build_is_missing_results(self): |
| 242 self.tool.buildbot.set_results(Build("MOCK Try Win", 5000), None) |
| 243 self.command.execute(self.command_options(issue=11112222), [], self.tool
) |
| 244 self.assertLog([ |
| 245 'ERROR: Failed to fetch results from ' |
| 246 '"https://storage.googleapis.com/chromium-layout-test-archives/MOCK_
Try_Win/5000/layout-test-results".\n' |
| 247 'Try starting a new job for MOCK Try Win by running :\n' |
| 248 ' git cl try -b MOCK Try Win\n' |
| 249 ]) |
| OLD | NEW |