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

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

Issue 2590693002: Only add unstaged baseline changes to the git index when rebaselining. (Closed)
Patch Set: rebaseline-cl: Abort if there are unstaged baseline changes. Created 3 years, 12 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
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.layout_test_results import LayoutTestResults 10 from webkitpy.common.net.layout_test_results import LayoutTestResults
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 def test_bails_when_one_build_is_missing_results(self): 293 def test_bails_when_one_build_is_missing_results(self):
294 self.tool.buildbot.set_results(Build("MOCK Try Win", 5000), None) 294 self.tool.buildbot.set_results(Build("MOCK Try Win", 5000), None)
295 self.command.execute(self.command_options(issue=11112222), [], self.tool ) 295 self.command.execute(self.command_options(issue=11112222), [], self.tool )
296 self.assertLog([ 296 self.assertLog([
297 'ERROR: Failed to fetch results from ' 297 'ERROR: Failed to fetch results from '
298 '"https://storage.googleapis.com/chromium-layout-test-archives/MOCK_ Try_Win/5000/layout-test-results".\n' 298 '"https://storage.googleapis.com/chromium-layout-test-archives/MOCK_ Try_Win/5000/layout-test-results".\n'
299 'Try starting a new job for MOCK Try Win by running :\n' 299 'Try starting a new job for MOCK Try Win by running :\n'
300 ' git cl try -b MOCK Try Win\n' 300 ' git cl try -b MOCK Try Win\n'
301 ]) 301 ])
302
303 def test_bails_when_there_are_unstaged_baselines(self):
304 scm = self.tool.scm()
305 scm.unstaged_changes = lambda: {'third_party/WebKit/LayoutTests/my-test- expected.txt': '?'}
306 self.command.execute(self.command_options(issue=11112222), [], self.tool )
307 self.assertLog([
308 'ERROR: Aborting: there are unstaged baselines:\n',
309 'ERROR: /mock-checkout/third_party/WebKit/LayoutTests/my-test-expe cted.txt\n',
310 ])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698