| 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 recipe_engine import recipe_api | 10 from recipe_engine import recipe_api |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 bot_config = master_dict.get('builders', {}).get(buildername) | 37 bot_config = master_dict.get('builders', {}).get(buildername) |
| 38 | 38 |
| 39 # Get the buildspec version. It can be supplied as a build property or as | 39 # Get the buildspec version. It can be supplied as a build property or as |
| 40 # a recipe config value. | 40 # a recipe config value. |
| 41 buildspec_version = (self.m.properties.get('buildspec_version') or | 41 buildspec_version = (self.m.properties.get('buildspec_version') or |
| 42 bot_config.get('buildspec_version')) | 42 bot_config.get('buildspec_version')) |
| 43 | 43 |
| 44 self.m.chromium.set_config( | 44 self.m.chromium.set_config( |
| 45 bot_config.get('chromium_config'), | 45 bot_config.get('chromium_config'), |
| 46 **bot_config.get('chromium_config_kwargs', {})) | 46 **bot_config.get('chromium_config_kwargs', {})) |
| 47 |
| 47 # Set GYP_DEFINES explicitly because chromium config constructor does | 48 # Set GYP_DEFINES explicitly because chromium config constructor does |
| 48 # not support that. | 49 # not support that. |
| 49 self.m.chromium.c.gyp_env.GYP_DEFINES.update( | 50 self.m.chromium.c.gyp_env.GYP_DEFINES.update( |
| 50 bot_config.get('GYP_DEFINES', {})) | 51 bot_config.get('GYP_DEFINES', {})) |
| 51 if bot_config.get('use_isolate'): | 52 if bot_config.get('use_isolate'): |
| 52 self.m.isolate.set_isolate_environment(self.m.chromium.c) | 53 self.m.isolate.set_isolate_environment(self.m.chromium.c) |
| 53 | 54 |
| 54 # WARNING: src-side runtest.py is only tested with chromium CQ builders. | 55 # WARNING: src-side runtest.py is only tested with chromium CQ builders. |
| 55 # Usage not covered by chromium CQ is not supported and can break | 56 # Usage not covered by chromium CQ is not supported and can break |
| 56 # without notice. | 57 # without notice. |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 def get_compile_targets_for_scripts(self): | 694 def get_compile_targets_for_scripts(self): |
| 694 return self.m.python( | 695 return self.m.python( |
| 695 name='get compile targets for scripts', | 696 name='get compile targets for scripts', |
| 696 script=self.m.path['checkout'].join( | 697 script=self.m.path['checkout'].join( |
| 697 'testing', 'scripts', 'get_compile_targets.py'), | 698 'testing', 'scripts', 'get_compile_targets.py'), |
| 698 args=[ | 699 args=[ |
| 699 '--output', self.m.json.output(), | 700 '--output', self.m.json.output(), |
| 700 '--', | 701 '--', |
| 701 ] + self.get_common_args_for_scripts(), | 702 ] + self.get_common_args_for_scripts(), |
| 702 step_test_data=lambda: self.m.json.test_api.output({})) | 703 step_test_data=lambda: self.m.json.test_api.output({})) |
| OLD | NEW |