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

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

Issue 2760463002: Add more logging when fetching layout test results. (Closed)
Patch Set: Created 3 years, 9 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_cl.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 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.checkout.git_mock import MockGit 10 from webkitpy.common.checkout.git_mock import MockGit
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 # A build number of None implies that a job has been started but not fin ished yet. 304 # A build number of None implies that a job has been started but not fin ished yet.
305 self.assertEqual( 305 self.assertEqual(
306 self.command.builders_with_pending_builds([Build('MOCK Try Linux', N one), Build('MOCK Try Win', 123)]), 306 self.command.builders_with_pending_builds([Build('MOCK Try Linux', N one), Build('MOCK Try Win', 123)]),
307 {'MOCK Try Linux'}) 307 {'MOCK Try Linux'})
308 308
309 def test_bails_when_one_build_is_missing_results(self): 309 def test_bails_when_one_build_is_missing_results(self):
310 self.tool.buildbot.set_results(Build('MOCK Try Win', 5000), None) 310 self.tool.buildbot.set_results(Build('MOCK Try Win', 5000), None)
311 return_code = self.command.execute(self.command_options(), [], self.tool ) 311 return_code = self.command.execute(self.command_options(), [], self.tool )
312 self.assertEqual(return_code, 1) 312 self.assertEqual(return_code, 1)
313 self.assertLog([ 313 self.assertLog([
314 'ERROR: Failed to fetch results from ' 314 'ERROR: Failed to fetch results for: Build(builder_name=\'MOCK Try W in\', build_number=5000)\n',
315 '"https://storage.googleapis.com/chromium-layout-test-archives/MOCK_ Try_Win/5000/layout-test-results".\n' 315 'ERROR: Results were expected to exist at:\n'
316 'Try starting a new job for MOCK Try Win by running :\n' 316 'https://storage.googleapis.com/chromium-layout-test-archives/MOCK_T ry_Win/5000/layout-test-results/results.html\n',
317 ' git cl try -b MOCK Try Win\n' 317 'ERROR: If the job failed, you could retry by running:\n'
318 'git cl try -b MOCK Try Win\n'
318 ]) 319 ])
319 320
320 def test_bails_when_there_are_unstaged_baselines(self): 321 def test_bails_when_there_are_unstaged_baselines(self):
321 git = self.tool.git() 322 git = self.tool.git()
322 git.unstaged_changes = lambda: {'third_party/WebKit/LayoutTests/my-test- expected.txt': '?'} 323 git.unstaged_changes = lambda: {'third_party/WebKit/LayoutTests/my-test- expected.txt': '?'}
323 return_code = self.command.execute(self.command_options(), [], self.tool ) 324 return_code = self.command.execute(self.command_options(), [], self.tool )
324 self.assertEqual(return_code, 1) 325 self.assertEqual(return_code, 1)
325 self.assertLog([ 326 self.assertLog([
326 'ERROR: Aborting: there are unstaged baselines:\n', 327 'ERROR: Aborting: there are unstaged baselines:\n',
327 'ERROR: /mock-checkout/third_party/WebKit/LayoutTests/my-test-expe cted.txt\n', 328 'ERROR: /mock-checkout/third_party/WebKit/LayoutTests/my-test-expe cted.txt\n',
328 ]) 329 ])
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698