Chromium Code Reviews| Index: tools/bisect-perf-regression.py |
| diff --git a/tools/bisect-perf-regression.py b/tools/bisect-perf-regression.py |
| index 0323b734da8f38e12099386b727afa03aad670d3..e884d3bb1672cdf40c627172299354a7a5b156e3 100755 |
| --- a/tools/bisect-perf-regression.py |
| +++ b/tools/bisect-perf-regression.py |
| @@ -1505,9 +1505,12 @@ class BisectPerformanceMetrics(object): |
| 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 |
|
qyearsley
2014/04/10 19:14:46
I guess this could theoretically also be written a
|
| def UpdateDeps(self, revision, depot, deps_file): |
| """Updates DEPS file with new revision of dependency repository. |
| @@ -1694,7 +1697,7 @@ class BisectPerformanceMetrics(object): |
| 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. |
| @@ -2205,7 +2208,7 @@ class BisectPerformanceMetrics(object): |
| 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: |