Skip to content

Commit

Permalink
BUG=
Browse files Browse the repository at this point in the history
NOTRY=True

Review URL: https://codereview.chromium.org/232023002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263141 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
prasadv@chromium.org committed Apr 11, 2014
1 parent a51ec8d commit 0e275e1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tools/bisect-perf-regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1560,9 +1560,12 @@ def GetBuilderNameAndBuildTime(target_arch='ia32'):
return False

def IsDownloadable(self, depot):
"""Checks if we can download builds for the depot from cloud."""
return (depot == 'chromium' or 'chromium' in DEPOT_DEPS_NAME[depot]['from']
or 'v8' in DEPOT_DEPS_NAME[depot]['from'])
"""Checks if build is downloadable based on target platform and depot."""
if self.opts.target_platform in ['chromium'] and self.opts.gs_bucket:
return (depot == 'chromium' or
'chromium' in DEPOT_DEPS_NAME[depot]['from'] or
'v8' in DEPOT_DEPS_NAME[depot]['from'])
return False

def UpdateDeps(self, revision, depot, deps_file):
"""Updates DEPS file with new revision of dependency repository.
Expand Down Expand Up @@ -1749,7 +1752,7 @@ def BuildCurrentRevision(self, depot, revision=None):
os.chdir(self.src_cwd)
# Fetch build archive for the given revision from the cloud storage when
# the storage bucket is passed.
if self.IsDownloadable(depot) and self.opts.gs_bucket and revision:
if self.IsDownloadable(depot) and revision:
deps_patch = None
if depot != 'chromium':
# Create a DEPS patch with new revision for dependency repository.
Expand Down Expand Up @@ -2260,7 +2263,7 @@ def SyncBuildAndRunRevision(self, revision, depot, command_to_run, metric,
metric)
# Restore build output directory once the tests are done, to avoid
# any descrepancy.
if depot == 'chromium' and self.opts.gs_bucket and revision:
if self.IsDownloadable(depot) and revision:
self.BackupOrRestoreOutputdirectory(restore=True)

if results[1] == 0:
Expand Down

0 comments on commit 0e275e1

Please sign in to comment.