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

Side by Side Diff: tools/bisect_utils.py

Issue 23447006: Skip the creation/sync step on the bot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 | « no previous file | tools/prepare-bisect-perf-regression.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 """Set of operations/utilities related to checking out the depot, and 5 """Set of operations/utilities related to checking out the depot, and
6 outputting annotations on the buildbot waterfall. These are intended to be 6 outputting annotations on the buildbot waterfall. These are intended to be
7 used by the bisection scripts.""" 7 used by the bisection scripts."""
8 8
9 import errno 9 import errno
10 import os 10 import os
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 """ 419 """
420 if opts.target_platform == 'android': 420 if opts.target_platform == 'android':
421 CopyAndSaveOriginalEnvironmentVars() 421 CopyAndSaveOriginalEnvironmentVars()
422 return SetupAndroidBuildEnvironment(opts) 422 return SetupAndroidBuildEnvironment(opts)
423 elif opts.target_platform == 'cros': 423 elif opts.target_platform == 'cros':
424 return SetupCrosRepo() 424 return SetupCrosRepo()
425 425
426 return True 426 return True
427 427
428 428
429 def CheckIfBisectDepotExists(opts):
430 """Checks if the bisect directory already exists.
431
432 Args:
433 opts: The options parsed from the command line through parse_args().
434
435 Returns:
436 Returns True if it exists.
437 """
438 path_to_dir = os.path.join(opts.working_directory, 'bisect', 'src')
439 return os.path.exists(path_to_dir)
440
441
429 def CreateBisectDirectoryAndSetupDepot(opts, custom_deps): 442 def CreateBisectDirectoryAndSetupDepot(opts, custom_deps):
430 """Sets up a subdirectory 'bisect' and then retrieves a copy of the depot 443 """Sets up a subdirectory 'bisect' and then retrieves a copy of the depot
431 there using gclient. 444 there using gclient.
432 445
433 Args: 446 Args:
434 opts: The options parsed from the command line through parse_args(). 447 opts: The options parsed from the command line through parse_args().
435 custom_deps: A dictionary of additional dependencies to add to .gclient. 448 custom_deps: A dictionary of additional dependencies to add to .gclient.
436 449
437 Returns: 450 Returns:
438 Returns 0 on success, otherwise 1. 451 Returns 0 on success, otherwise 1.
439 """ 452 """
440 if not CreateAndChangeToSourceDirectory(opts.working_directory): 453 if not CreateAndChangeToSourceDirectory(opts.working_directory):
441 print 'Error: Could not create bisect directory.' 454 print 'Error: Could not create bisect directory.'
442 print 455 print
443 return 1 456 return 1
444 457
445 if not SetupGitDepot(opts, custom_deps): 458 if not SetupGitDepot(opts, custom_deps):
446 print 'Error: Failed to grab source.' 459 print 'Error: Failed to grab source.'
447 print 460 print
448 return 1 461 return 1
449 462
450 return 0 463 return 0
OLDNEW
« no previous file with comments | « no previous file | tools/prepare-bisect-perf-regression.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698