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 itertools | 7 import itertools |
8 import json | 8 import json |
9 | 9 |
10 from recipe_engine.types import freeze | 10 from recipe_engine.types import freeze |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 # those may be the values of the continuous builder the trybot may | 440 # those may be the values of the continuous builder the trybot may |
441 # be configured to match; we need to use the actual mastername | 441 # be configured to match; we need to use the actual mastername |
442 # and buildername we're running on, because it may be configured | 442 # and buildername we're running on, because it may be configured |
443 # with different MB settings. | 443 # with different MB settings. |
444 real_mastername = self.m.properties['mastername'] | 444 real_mastername = self.m.properties['mastername'] |
445 real_buildername = self.m.properties['buildername'] | 445 real_buildername = self.m.properties['buildername'] |
446 self.m.chromium.run_mb(real_mastername, real_buildername, | 446 self.m.chromium.run_mb(real_mastername, real_buildername, |
447 isolated_targets=isolated_targets, | 447 isolated_targets=isolated_targets, |
448 name='generate_build_files%s' % name_suffix) | 448 name='generate_build_files%s' % name_suffix) |
449 | 449 |
| 450 if not compile_targets: |
| 451 raise self.m.step.InfraFailure('Misconfigured bot: no compile targets') |
450 self.m.chromium.compile(compile_targets, name='compile%s' % name_suffix) | 452 self.m.chromium.compile(compile_targets, name='compile%s' % name_suffix) |
451 | 453 |
452 def tests_for_builder(self, mastername, buildername, update_step, master_dict, | 454 def tests_for_builder(self, mastername, buildername, update_step, master_dict, |
453 override_bot_type=None): | 455 override_bot_type=None): |
454 got_revision = update_step.presentation.properties['got_revision'] | 456 got_revision = update_step.presentation.properties['got_revision'] |
455 | 457 |
456 bot_config = master_dict.get('builders', {}).get(buildername) | 458 bot_config = master_dict.get('builders', {}).get(buildername) |
457 master_config = master_dict.get('settings', {}) | 459 master_config = master_dict.get('settings', {}) |
458 | 460 |
459 bot_type = override_bot_type or bot_config.get('bot_type', 'builder_tester') | 461 bot_type = override_bot_type or bot_config.get('bot_type', 'builder_tester') |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 def get_compile_targets_for_scripts(self): | 763 def get_compile_targets_for_scripts(self): |
762 return self.m.python( | 764 return self.m.python( |
763 name='get compile targets for scripts', | 765 name='get compile targets for scripts', |
764 script=self.m.path['checkout'].join( | 766 script=self.m.path['checkout'].join( |
765 'testing', 'scripts', 'get_compile_targets.py'), | 767 'testing', 'scripts', 'get_compile_targets.py'), |
766 args=[ | 768 args=[ |
767 '--output', self.m.json.output(), | 769 '--output', self.m.json.output(), |
768 '--', | 770 '--', |
769 ] + self.get_common_args_for_scripts(), | 771 ] + self.get_common_args_for_scripts(), |
770 step_test_data=lambda: self.m.json.test_api.output({})) | 772 step_test_data=lambda: self.m.json.test_api.output({})) |
OLD | NEW |