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

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

Issue 2547153002: In webkit-patch rebaseline-cl, abort if results are missing. (Closed)
Patch Set: Add unit test Created 4 years 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
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 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
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
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)
wkorman 2016/12/05 05:58:35 Perhaps worth a test case that has at least one wi
qyearsley 2016/12/05 17:55:21 Currently test_execute_with_issue_number_given (an
wkorman 2016/12/05 18:56:25 Ah, I see. Yes, that wasn't immediately apparent.
qyearsley 2016/12/07 00:42:27 Probably nicer to make this change in a separate C
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 ])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698