Chromium Code Reviews| 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 ast | 5 import ast |
| 6 import contextlib | 6 import contextlib |
| 7 import copy | 7 import copy |
| 8 import itertools | 8 import itertools |
| 9 import json | 9 import json |
| 10 | 10 |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 467 mode='dev' | 467 mode='dev' |
| 468 ) | 468 ) |
| 469 | 469 |
| 470 def run_mb_and_compile(self, compile_targets, isolated_targets, name_suffix): | 470 def run_mb_and_compile(self, compile_targets, isolated_targets, name_suffix): |
| 471 if self.m.chromium.c.project_generator.tool == 'mb': | 471 if self.m.chromium.c.project_generator.tool == 'mb': |
| 472 # We don't use the mastername and buildername passed in, because | 472 # We don't use the mastername and buildername passed in, because |
| 473 # those may be the values of the continuous builder the trybot may | 473 # those may be the values of the continuous builder the trybot may |
| 474 # be configured to match; we need to use the actual mastername | 474 # be configured to match; we need to use the actual mastername |
| 475 # and buildername we're running on, because it may be configured | 475 # and buildername we're running on, because it may be configured |
| 476 # with different MB settings. | 476 # with different MB settings. |
| 477 real_mastername = self.m.properties['mastername'] | 477 # However, recipes used by Findit may override the defaults to be able to |
| 478 real_buildername = self.m.properties['buildername'] | 478 # exactly match a given continuous builder. |
| 479 self.m.chromium.run_mb(real_mastername, real_buildername, | 479 target_mastername = (self.m.properties.get('target_mastername') or |
|
Paweł Hajdan Jr.
2015/11/25 16:29:15
Why not make these arguments of this method like I
Dirk Pranke
2015/11/25 17:26:34
I replied to that in the other CL. I don't think i
| |
| 480 self.m.properties['mastername']) | |
| 481 target_buildername = (self.m.properties.get('target_buildername') or | |
| 482 self.m.properties['buildername']) | |
| 483 self.m.chromium.run_mb(target_mastername, target_buildername, | |
| 480 isolated_targets=isolated_targets, | 484 isolated_targets=isolated_targets, |
| 481 name='generate_build_files%s' % name_suffix) | 485 name='generate_build_files%s' % name_suffix) |
| 482 | 486 |
| 483 self.m.chromium.compile(compile_targets, name='compile%s' % name_suffix) | 487 self.m.chromium.compile(compile_targets, name='compile%s' % name_suffix) |
| 484 | 488 |
| 485 def tests_for_builder(self, mastername, buildername, update_step, master_dict, | 489 def tests_for_builder(self, mastername, buildername, update_step, master_dict, |
| 486 override_bot_type=None): | 490 override_bot_type=None): |
| 487 got_revision = update_step.presentation.properties['got_revision'] | 491 got_revision = update_step.presentation.properties['got_revision'] |
| 488 | 492 |
| 489 bot_config = master_dict.get('builders', {}).get(buildername) | 493 bot_config = master_dict.get('builders', {}).get(buildername) |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 814 result_text = 'MB is enabled for this builder at this revision.' | 818 result_text = 'MB is enabled for this builder at this revision.' |
| 815 log_name = 'Builder MB-ready' | 819 log_name = 'Builder MB-ready' |
| 816 self.m.step.active_result.presentation.logs[log_name] = [result_text] | 820 self.m.step.active_result.presentation.logs[log_name] = [result_text] |
| 817 return False | 821 return False |
| 818 except (self.m.step.StepFailure, KeyError): | 822 except (self.m.step.StepFailure, KeyError): |
| 819 result_text = 'MB is not enabled for this builder at this revision.' | 823 result_text = 'MB is not enabled for this builder at this revision.' |
| 820 log_name = 'Builder NOT MB-ready' | 824 log_name = 'Builder NOT MB-ready' |
| 821 self.m.step.active_result.presentation.logs[log_name] = [result_text] | 825 self.m.step.active_result.presentation.logs[log_name] = [result_text] |
| 822 self.m.step.active_result.presentation.status = self.m.step.WARNING | 826 self.m.step.active_result.presentation.status = self.m.step.WARNING |
| 823 return True | 827 return True |
| OLD | NEW |