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 self.m.python.failing_step( | |
452 'compile', 'Misconfigured bot: no compile targets') | |
453 self.m.chromium.compile(compile_targets, name='compile%s' % name_suffix) | 450 self.m.chromium.compile(compile_targets, name='compile%s' % name_suffix) |
454 | 451 |
455 def tests_for_builder(self, mastername, buildername, update_step, master_dict, | 452 def tests_for_builder(self, mastername, buildername, update_step, master_dict, |
456 override_bot_type=None): | 453 override_bot_type=None): |
457 got_revision = update_step.presentation.properties['got_revision'] | 454 got_revision = update_step.presentation.properties['got_revision'] |
458 | 455 |
459 bot_config = master_dict.get('builders', {}).get(buildername) | 456 bot_config = master_dict.get('builders', {}).get(buildername) |
460 master_config = master_dict.get('settings', {}) | 457 master_config = master_dict.get('settings', {}) |
461 | 458 |
462 bot_type = override_bot_type or bot_config.get('bot_type', 'builder_tester') | 459 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... |
764 def get_compile_targets_for_scripts(self): | 761 def get_compile_targets_for_scripts(self): |
765 return self.m.python( | 762 return self.m.python( |
766 name='get compile targets for scripts', | 763 name='get compile targets for scripts', |
767 script=self.m.path['checkout'].join( | 764 script=self.m.path['checkout'].join( |
768 'testing', 'scripts', 'get_compile_targets.py'), | 765 'testing', 'scripts', 'get_compile_targets.py'), |
769 args=[ | 766 args=[ |
770 '--output', self.m.json.output(), | 767 '--output', self.m.json.output(), |
771 '--', | 768 '--', |
772 ] + self.get_common_args_for_scripts(), | 769 ] + self.get_common_args_for_scripts(), |
773 step_test_data=lambda: self.m.json.test_api.output({})) | 770 step_test_data=lambda: self.m.json.test_api.output({})) |
OLD | NEW |