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

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

Issue 1104533002: Add recipe for split AMP/local CQ. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
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 json 7 import json
8 8
9 from infra.libs.infra_types import freeze, thaw 9 from infra.libs.infra_types import freeze, thaw
10 from slave import recipe_api 10 from slave import recipe_api
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 bot_update_json['properties']['got_revision']) 679 bot_update_json['properties']['got_revision'])
680 self.m.bot_update.ensure_checkout( 680 self.m.bot_update.ensure_checkout(
681 force=True, patch=False, update_presentation=False) 681 force=True, patch=False, update_presentation=False)
682 try: 682 try:
683 self.m.chromium.runhooks(name='runhooks (without patch)') 683 self.m.chromium.runhooks(name='runhooks (without patch)')
684 except self.m.step.StepFailure: 684 except self.m.step.StepFailure:
685 self.m.tryserver.set_transient_failure_tryjob_result() 685 self.m.tryserver.set_transient_failure_tryjob_result()
686 raise 686 raise
687 687
688 def run_tests_and_deapply_as_needed(self, mastername, api, tests, 688 def run_tests_and_deapply_as_needed(self, mastername, api, tests,
689 bot_update_step): 689 bot_update_step, amp_tests=[]):
690 def deapply_patch_fn(failing_tests): 690 def deapply_patch_fn(failing_tests):
691 self.deapply_patch(bot_update_step) 691 self.deapply_patch(bot_update_step)
692 compile_targets = list(self.m.itertools.chain( 692 compile_targets = list(self.m.itertools.chain(
693 *[t.compile_targets(api) for t in failing_tests])) 693 *[t.compile_targets(api) for t in failing_tests]))
694 if compile_targets: 694 if compile_targets:
695 # Remove duplicate targets. 695 # Remove duplicate targets.
696 compile_targets = sorted(set(compile_targets)) 696 compile_targets = sorted(set(compile_targets))
697 has_failing_swarming_tests = [ 697 has_failing_swarming_tests = [
698 t for t in failing_tests if t.uses_swarming] 698 t for t in failing_tests if t.uses_swarming]
699 if has_failing_swarming_tests: 699 if has_failing_swarming_tests:
700 self.m.isolate.clean_isolated_files(self.m.chromium.output_dir) 700 self.m.isolate.clean_isolated_files(self.m.chromium.output_dir)
701 try: 701 try:
702 self.m.chromium.compile( 702 self.m.chromium.compile(
703 compile_targets, name='compile (without patch)') 703 compile_targets, name='compile (without patch)')
704 except self.m.step.StepFailure: 704 except self.m.step.StepFailure:
705 self.m.tryserver.set_transient_failure_tryjob_result() 705 self.m.tryserver.set_transient_failure_tryjob_result()
706 raise 706 raise
707 if has_failing_swarming_tests: 707 if has_failing_swarming_tests:
708 self.m.isolate.isolate_tests(self.m.chromium.output_dir, 708 self.m.isolate.isolate_tests(self.m.chromium.output_dir,
709 verbose=True) 709 verbose=True)
710 710
711 with self.wrap_chromium_tests(mastername): 711 with self.wrap_chromium_tests(mastername):
712 return self.m.test_utils.determine_new_failures(api, tests, 712 return self.m.test_utils.determine_new_failures(api, tests,
713 deapply_patch_fn) 713 deapply_patch_fn,
714 amp_tests)
714 715
715 def analyze(self, affected_files, exes, compile_targets, config_file_name, 716 def analyze(self, affected_files, exes, compile_targets, config_file_name,
716 additional_names=None, use_mb=False, build_output_dir=None): 717 additional_names=None, use_mb=False, build_output_dir=None):
717 """Runs "analyze" step to determine targets affected by the patch. 718 """Runs "analyze" step to determine targets affected by the patch.
718 719
719 Returns a tuple of: 720 Returns a tuple of:
720 - boolean, indicating whether patch requires compile 721 - boolean, indicating whether patch requires compile
721 - list of matching exes (see filter recipe module) 722 - list of matching exes (see filter recipe module)
722 - list of targets that need to be compiled (see filter recipe module)""" 723 - list of targets that need to be compiled (see filter recipe module)"""
723 724
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 master_config.get('build_gs_bucket'), 834 master_config.get('build_gs_bucket'),
834 extra_url_components=None) 835 extra_url_components=None)
835 elif (mastername == 'tryserver.chromium.perf' or 836 elif (mastername == 'tryserver.chromium.perf' or
836 (mastername == 'tryserver.chromium.linux' and 837 (mastername == 'tryserver.chromium.linux' and
837 buildername == 'linux_full_bisect_builder')): 838 buildername == 'linux_full_bisect_builder')):
838 return None 839 return None
839 else: 840 else:
840 return self.m.archive.legacy_upload_url( 841 return self.m.archive.legacy_upload_url(
841 master_config.get('build_gs_bucket'), 842 master_config.get('build_gs_bucket'),
842 extra_url_components=self.m.properties['mastername']) 843 extra_url_components=self.m.properties['mastername'])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698