Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: scripts/slave/recipe_modules/chromium_tests/api.py

Issue 2166343002: chromium_tests: use correct cwd for deapplying patch (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium_trybot.expected/compile_failure_infra.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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()
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium_trybot.expected/compile_failure_infra.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698