| 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 # We only override first solution here to make sure that we correctly revert | 637 # We only override first solution here to make sure that we correctly revert |
| 638 # changes to DEPS file, which is particularly important for auto-rolls. It | 638 # changes to DEPS file, which is particularly important for auto-rolls. It |
| 639 # is also imporant that we do not assume that corresponding revision is | 639 # is also imporant that we do not assume that corresponding revision is |
| 640 # stored in the 'got_revision' as some gclient configs change the default | 640 # stored in the 'got_revision' as some gclient configs change the default |
| 641 # mapping for their own purposes. | 641 # mapping for their own purposes. |
| 642 first_solution_name = self.m.gclient.c.solutions[0].name | 642 first_solution_name = self.m.gclient.c.solutions[0].name |
| 643 rev_property = self.m.gclient.c.got_revision_mapping[first_solution_name] | 643 rev_property = self.m.gclient.c.got_revision_mapping[first_solution_name] |
| 644 self.m.gclient.c.revisions[first_solution_name] = str( | 644 self.m.gclient.c.revisions[first_solution_name] = str( |
| 645 bot_update_json['properties'][rev_property]) | 645 bot_update_json['properties'][rev_property]) |
| 646 self._resolve_fixed_revisions(bot_update_json) | 646 self._resolve_fixed_revisions(bot_update_json) |
| 647 |
| 648 kwargs = {} |
| 649 if self._working_dir: |
| 650 kwargs['cwd'] = self._working_dir |
| 651 |
| 647 self.m.bot_update.ensure_checkout( | 652 self.m.bot_update.ensure_checkout( |
| 648 force=True, patch=False, update_presentation=False) | 653 force=True, patch=False, update_presentation=False, **kwargs) |
| 649 self.m.chromium.runhooks(name='runhooks (without patch)') | 654 self.m.chromium.runhooks(name='runhooks (without patch)') |
| 650 | 655 |
| 651 def run_tests_on_tryserver(self, bot_config, api, tests, bot_update_step, | 656 def run_tests_on_tryserver(self, bot_config, api, tests, bot_update_step, |
| 652 affected_files, mb_mastername=None, | 657 affected_files, mb_mastername=None, |
| 653 mb_buildername=None): | 658 mb_buildername=None): |
| 654 def deapply_patch_fn(failing_tests): | 659 def deapply_patch_fn(failing_tests): |
| 655 self.deapply_patch(bot_update_step) | 660 self.deapply_patch(bot_update_step) |
| 656 compile_targets = list(itertools.chain( | 661 compile_targets = list(itertools.chain( |
| 657 *[t.compile_targets(api) for t in failing_tests])) | 662 *[t.compile_targets(api) for t in failing_tests])) |
| 658 if compile_targets: | 663 if compile_targets: |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 | 817 |
| 813 if not tests: | 818 if not tests: |
| 814 return | 819 return |
| 815 | 820 |
| 816 api.chromium_swarming.configure_swarming( | 821 api.chromium_swarming.configure_swarming( |
| 817 'chromium', precommit=False, mastername=mastername) | 822 'chromium', precommit=False, mastername=mastername) |
| 818 test_runner = api.chromium_tests.create_test_runner( | 823 test_runner = api.chromium_tests.create_test_runner( |
| 819 api, tests, serialize_tests=bot_config.get('serialize_tests')) | 824 api, tests, serialize_tests=bot_config.get('serialize_tests')) |
| 820 with api.chromium_tests.wrap_chromium_tests(bot_config, tests): | 825 with api.chromium_tests.wrap_chromium_tests(bot_config, tests): |
| 821 test_runner() | 826 test_runner() |
| OLD | NEW |