| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import contextlib | 5 import contextlib |
| 6 import copy | 6 import copy |
| 7 import json | 7 import json |
| 8 | 8 |
| 9 from infra.libs.infra_types import freeze, thaw | 9 from infra.libs.infra_types import freeze, thaw |
| 10 from slave import recipe_api | 10 from recipe_engine import recipe_api |
| 11 from slave import recipe_util | 11 from recipe_engine import util as recipe_util |
| 12 | 12 |
| 13 | 13 |
| 14 class ChromiumTestsApi(recipe_api.RecipeApi): | 14 class ChromiumTestsApi(recipe_api.RecipeApi): |
| 15 def configure_build(self, mastername, buildername, override_bot_type=None, | 15 def configure_build(self, mastername, buildername, override_bot_type=None, |
| 16 ): | 16 ): |
| 17 master_dict = self.m.chromium.builders.get(mastername, {}) | 17 master_dict = self.m.chromium.builders.get(mastername, {}) |
| 18 bot_config = master_dict.get('builders', {}).get(buildername) | 18 bot_config = master_dict.get('builders', {}).get(buildername) |
| 19 | 19 |
| 20 # Get the buildspec version. It can be supplied as a build property or as | 20 # Get the buildspec version. It can be supplied as a build property or as |
| 21 # a recipe config value. | 21 # a recipe config value. |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 master_config.get('build_gs_bucket'), | 605 master_config.get('build_gs_bucket'), |
| 606 extra_url_components=None) | 606 extra_url_components=None) |
| 607 elif (mastername == 'tryserver.chromium.perf' or | 607 elif (mastername == 'tryserver.chromium.perf' or |
| 608 (mastername == 'tryserver.chromium.linux' and | 608 (mastername == 'tryserver.chromium.linux' and |
| 609 buildername == 'linux_full_bisect_builder')): | 609 buildername == 'linux_full_bisect_builder')): |
| 610 return None | 610 return None |
| 611 else: | 611 else: |
| 612 return self.m.archive.legacy_upload_url( | 612 return self.m.archive.legacy_upload_url( |
| 613 master_config.get('build_gs_bucket'), | 613 master_config.get('build_gs_bucket'), |
| 614 extra_url_components=self.m.properties['mastername']) | 614 extra_url_components=self.m.properties['mastername']) |
| OLD | NEW |