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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 except self.m.step.StepFailure: | 120 except self.m.step.StepFailure: |
121 # As part of deapplying patch we call runhooks without the patch. | 121 # As part of deapplying patch we call runhooks without the patch. |
122 self.deapply_patch(update_step) | 122 self.deapply_patch(update_step) |
123 raise | 123 raise |
124 else: | 124 else: |
125 self.m.chromium.runhooks() | 125 self.m.chromium.runhooks() |
126 | 126 |
127 test_spec_file = bot_config.get('testing', {}).get('test_spec_file', | 127 test_spec_file = bot_config.get('testing', {}).get('test_spec_file', |
128 '%s.json' % mastername) | 128 '%s.json' % mastername) |
129 | 129 |
130 if self.m.chromium.c.project_generator.tool == 'mb': | |
131 self.m.chromium.run_mb(mastername, buildername) | |
132 | |
133 # TODO(phajdan.jr): Bots should have no generators instead. | 130 # TODO(phajdan.jr): Bots should have no generators instead. |
134 if bot_config.get('disable_tests'): | 131 if bot_config.get('disable_tests'): |
135 test_spec = {} | 132 test_spec = {} |
136 scripts_compile_targets = {} | 133 scripts_compile_targets = {} |
137 else: | 134 else: |
138 test_spec = self.read_test_spec(self.m, test_spec_file) | 135 test_spec = self.read_test_spec(self.m, test_spec_file) |
139 test_spec_path = self.m.path['checkout'].join('testing', 'buildbot', | 136 test_spec_path = self.m.path['checkout'].join('testing', 'buildbot', |
140 test_spec_file) | 137 test_spec_file) |
141 | 138 |
142 scripts_compile_targets = \ | 139 scripts_compile_targets = \ |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 305 |
309 bot_config = master_dict.get('builders', {}).get(buildername) | 306 bot_config = master_dict.get('builders', {}).get(buildername) |
310 master_config = master_dict.get('settings', {}) | 307 master_config = master_dict.get('settings', {}) |
311 bot_type = override_bot_type or bot_config.get('bot_type', 'builder_tester') | 308 bot_type = override_bot_type or bot_config.get('bot_type', 'builder_tester') |
312 | 309 |
313 self.m.chromium.cleanup_temp() | 310 self.m.chromium.cleanup_temp() |
314 if self.m.chromium.c.TARGET_PLATFORM == 'android': | 311 if self.m.chromium.c.TARGET_PLATFORM == 'android': |
315 self.m.chromium_android.clean_local_files() | 312 self.m.chromium_android.clean_local_files() |
316 self.m.chromium_android.run_tree_truth() | 313 self.m.chromium_android.run_tree_truth() |
317 | 314 |
| 315 if self.m.chromium.c.project_generator.tool == 'mb': |
| 316 self.m.chromium.run_mb(mastername, buildername, swarming_targets=[ |
| 317 t.name for t in tests_including_triggered if t.uses_swarming]) |
| 318 |
318 if bot_type in ['builder', 'builder_tester']: | 319 if bot_type in ['builder', 'builder_tester']: |
319 isolated_targets = [ | 320 isolated_targets = [ |
320 t.isolate_target for t in tests_including_triggered if t.uses_swarming | 321 t.isolate_target for t in tests_including_triggered if t.uses_swarming |
321 ] | 322 ] |
322 | 323 |
323 if isolated_targets: | 324 if isolated_targets: |
324 self.m.isolate.clean_isolated_files(self.m.chromium.output_dir) | 325 self.m.isolate.clean_isolated_files(self.m.chromium.output_dir) |
325 | 326 |
326 self.transient_check(update_step, lambda transform_name: | 327 self.transient_check(update_step, lambda transform_name: |
327 self.m.chromium.compile(compile_targets, | 328 self.m.chromium.compile(compile_targets, |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 def get_compile_targets_for_scripts(self): | 675 def get_compile_targets_for_scripts(self): |
675 return self.m.python( | 676 return self.m.python( |
676 name='get compile targets for scripts', | 677 name='get compile targets for scripts', |
677 script=self.m.path['checkout'].join( | 678 script=self.m.path['checkout'].join( |
678 'testing', 'scripts', 'get_compile_targets.py'), | 679 'testing', 'scripts', 'get_compile_targets.py'), |
679 args=[ | 680 args=[ |
680 '--output', self.m.json.output(), | 681 '--output', self.m.json.output(), |
681 '--', | 682 '--', |
682 ] + self.get_common_args_for_scripts(), | 683 ] + self.get_common_args_for_scripts(), |
683 step_test_data=lambda: self.m.json.test_api.output({})) | 684 step_test_data=lambda: self.m.json.test_api.output({})) |
OLD | NEW |