Commit 0e275e14 authored by prasadv@chromium.org's avatar prasadv@chromium.org

BUG=

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
parent a51ec8d0
...@@ -1560,9 +1560,12 @@ class BisectPerformanceMetrics(object): ...@@ -1560,9 +1560,12 @@ class BisectPerformanceMetrics(object):
return False return False
def IsDownloadable(self, depot): def IsDownloadable(self, depot):
"""Checks if we can download builds for the depot from cloud.""" """Checks if build is downloadable based on target platform and depot."""
return (depot == 'chromium' or 'chromium' in DEPOT_DEPS_NAME[depot]['from'] if self.opts.target_platform in ['chromium'] and self.opts.gs_bucket:
or 'v8' in DEPOT_DEPS_NAME[depot]['from']) 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): def UpdateDeps(self, revision, depot, deps_file):
"""Updates DEPS file with new revision of dependency repository. """Updates DEPS file with new revision of dependency repository.
...@@ -1749,7 +1752,7 @@ class BisectPerformanceMetrics(object): ...@@ -1749,7 +1752,7 @@ class BisectPerformanceMetrics(object):
os.chdir(self.src_cwd) os.chdir(self.src_cwd)
# Fetch build archive for the given revision from the cloud storage when # Fetch build archive for the given revision from the cloud storage when
# the storage bucket is passed. # 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 deps_patch = None
if depot != 'chromium': if depot != 'chromium':
# Create a DEPS patch with new revision for dependency repository. # Create a DEPS patch with new revision for dependency repository.
...@@ -2260,7 +2263,7 @@ class BisectPerformanceMetrics(object): ...@@ -2260,7 +2263,7 @@ class BisectPerformanceMetrics(object):
metric) metric)
# Restore build output directory once the tests are done, to avoid # Restore build output directory once the tests are done, to avoid
# any descrepancy. # any descrepancy.
if depot == 'chromium' and self.opts.gs_bucket and revision: if self.IsDownloadable(depot) and revision:
self.BackupOrRestoreOutputdirectory(restore=True) self.BackupOrRestoreOutputdirectory(restore=True)
if results[1] == 0: if results[1] == 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment