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

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

Issue 1241323004: Cross-repo recipe package system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 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 | 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 itertools
7 import json 8 import json
8 9
9 from infra.libs.infra_types import freeze, thaw 10 from infra.libs.infra_types import freeze, thaw
10 from recipe_engine import recipe_api 11 from recipe_engine import recipe_api
11 from recipe_engine import util as recipe_util 12 from recipe_engine import util as recipe_util
12 13
13 from . import builders 14 from . import builders
14 from . import steps 15 from . import steps
15 16
16 17
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 try: 487 try:
487 self.m.chromium.runhooks(name='runhooks (without patch)') 488 self.m.chromium.runhooks(name='runhooks (without patch)')
488 except self.m.step.StepFailure: 489 except self.m.step.StepFailure:
489 self.m.tryserver.set_transient_failure_tryjob_result() 490 self.m.tryserver.set_transient_failure_tryjob_result()
490 raise 491 raise
491 492
492 def run_tests_and_deapply_as_needed(self, mastername, api, tests, 493 def run_tests_and_deapply_as_needed(self, mastername, api, tests,
493 bot_update_step): 494 bot_update_step):
494 def deapply_patch_fn(failing_tests): 495 def deapply_patch_fn(failing_tests):
495 self.deapply_patch(bot_update_step) 496 self.deapply_patch(bot_update_step)
496 compile_targets = list(self.m.itertools.chain( 497 compile_targets = list(itertools.chain(
497 *[t.compile_targets(api) for t in failing_tests])) 498 *[t.compile_targets(api) for t in failing_tests]))
498 if compile_targets: 499 if compile_targets:
499 # Remove duplicate targets. 500 # Remove duplicate targets.
500 compile_targets = sorted(set(compile_targets)) 501 compile_targets = sorted(set(compile_targets))
501 has_failing_swarming_tests = [ 502 has_failing_swarming_tests = [
502 t for t in failing_tests if t.uses_swarming] 503 t for t in failing_tests if t.uses_swarming]
503 if has_failing_swarming_tests: 504 if has_failing_swarming_tests:
504 self.m.isolate.clean_isolated_files(self.m.chromium.output_dir) 505 self.m.isolate.clean_isolated_files(self.m.chromium.output_dir)
505 try: 506 try:
506 self.m.chromium.compile( 507 self.m.chromium.compile(
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 def get_compile_targets_for_scripts(self): 695 def get_compile_targets_for_scripts(self):
695 return self.m.python( 696 return self.m.python(
696 name='get compile targets for scripts', 697 name='get compile targets for scripts',
697 script=self.m.path['checkout'].join( 698 script=self.m.path['checkout'].join(
698 'testing', 'scripts', 'get_compile_targets.py'), 699 'testing', 'scripts', 'get_compile_targets.py'),
699 args=[ 700 args=[
700 '--output', self.m.json.output(), 701 '--output', self.m.json.output(),
701 '--', 702 '--',
702 ] + self.get_common_args_for_scripts(), 703 ] + self.get_common_args_for_scripts(),
703 step_test_data=lambda: self.m.json.test_api.output({})) 704 step_test_data=lambda: self.m.json.test_api.output({}))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698