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

Unified Diff: tools/bisect_utils.py

Issue 12780015: Added call to stop goma in case it's still running from a build that timed out. Added --verbose par… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/bisect-perf-regression.py ('k') | tools/prepare-bisect-perf-regression.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bisect_utils.py
diff --git a/tools/bisect_utils.py b/tools/bisect_utils.py
index 0439d769b5e6e08bd88d0867946eb8f27b3d5b4b..4447f48ecc20fee3aeb02e938c73ec3d6b7d97c3 100644
--- a/tools/bisect_utils.py
+++ b/tools/bisect_utils.py
@@ -38,15 +38,19 @@ def OutputAnnotationStepStart(name):
Args:
name: The name of the step.
"""
+ print
print '@@@SEED_STEP %s@@@' % name
print '@@@STEP_CURSOR %s@@@' % name
print '@@@STEP_STARTED@@@'
+ print
def OutputAnnotationStepClosed():
"""Outputs appropriate annotation to signal the closing of a step to
a trybot."""
+ print
print '@@@STEP_CLOSED@@@'
+ print
def CreateAndChangeToSourceDirectory(working_directory):
@@ -99,19 +103,28 @@ def RunGClientAndCreateConfig():
return return_code
-def RunGClientAndSync():
+def RunGClientAndSync(reset):
"""Runs gclient and does a normal sync.
+ Args:
+ reset: Whether to reset any changes to the depot.
+
Returns:
The return code of the call.
"""
- return RunGClient(['sync'])
+ params = ['sync', '--verbose']
+ if reset:
+ params.extend(['--reset', '--force', '--delete_unversioned_trees'])
+ return RunGClient(params)
-def SetupGitDepot(output_buildbot_annotations):
+def SetupGitDepot(output_buildbot_annotations, reset):
"""Sets up the depot for the bisection. The depot will be located in a
subdirectory called 'bisect'.
+ Args:
+ reset: Whether to reset any changes to the depot.
+
Returns:
True if gclient successfully created the config file and did a sync, False
otherwise.
@@ -124,7 +137,7 @@ def SetupGitDepot(output_buildbot_annotations):
passed = False
if not RunGClientAndCreateConfig():
- if not RunGClientAndSync():
+ if not RunGClientAndSync(reset):
passed = True
if output_buildbot_annotations:
@@ -134,12 +147,13 @@ def SetupGitDepot(output_buildbot_annotations):
return passed
-def CreateBisectDirectoryAndSetupDepot(opts):
+def CreateBisectDirectoryAndSetupDepot(opts, reset=False):
"""Sets up a subdirectory 'bisect' and then retrieves a copy of the depot
there using gclient.
Args:
opts: The options parsed from the command line through parse_args().
+ reset: Whether to reset any changes to the depot.
Returns:
Returns 0 on success, otherwise 1.
@@ -149,7 +163,7 @@ def CreateBisectDirectoryAndSetupDepot(opts):
print
return 1
- if not SetupGitDepot(opts.output_buildbot_annotations):
+ if not SetupGitDepot(opts.output_buildbot_annotations, reset):
print 'Error: Failed to grab source.'
print
return 1
« no previous file with comments | « tools/bisect-perf-regression.py ('k') | tools/prepare-bisect-perf-regression.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698