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

Side by Side Diff: scripts/slave/recipes/chromium_trybot_legacy.py

Issue 1241323004: Cross-repo recipe package system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Roll to latest recipes-py Created 5 years, 3 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
« no previous file with comments | « scripts/slave/recipes/chromium_trybot.py ('k') | scripts/slave/recipes/cronet.py » ('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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 from infra.libs.infra_types import freeze 5 import itertools
6
7 from recipe_engine.types import freeze
6 8
7 DEPS = [ 9 DEPS = [
8 'bot_update', 10 'bot_update',
9 'chromium', 11 'chromium',
10 'chromium_android', 12 'chromium_android',
11 'chromium_tests', 13 'chromium_tests',
12 'gclient', 14 'gclient',
13 'gpu', 15 'gpu',
14 'isolate', 16 'isolate',
15 'itertools',
16 'json', 17 'json',
17 'path', 18 'path',
18 'platform', 19 'platform',
19 'properties', 20 'properties',
20 'python', 21 'python',
21 'raw_io', 22 'raw_io',
22 'step', 23 'step',
23 'swarming', 24 'swarming',
24 'test_utils', 25 'test_utils',
25 'tryserver', 26 'tryserver',
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 try: 389 try:
389 api.chromium.runhooks(name='runhooks (with patch)') 390 api.chromium.runhooks(name='runhooks (with patch)')
390 except api.step.StepFailure: 391 except api.step.StepFailure:
391 # As part of deapplying patch we call runhooks without the patch. 392 # As part of deapplying patch we call runhooks without the patch.
392 api.chromium_tests.deapply_patch(bot_update_step) 393 api.chromium_tests.deapply_patch(bot_update_step)
393 raise 394 raise
394 395
395 if bot_config.get('use_isolate'): 396 if bot_config.get('use_isolate'):
396 api.isolate.clean_isolated_files(api.chromium.output_dir) 397 api.isolate.clean_isolated_files(api.chromium.output_dir)
397 398
398 compile_targets.extend(api.itertools.chain( 399 compile_targets.extend(itertools.chain(
399 *[t.compile_targets(api) for t in tests])) 400 *[t.compile_targets(api) for t in tests]))
400 # Remove duplicate targets. 401 # Remove duplicate targets.
401 compile_targets = sorted(set(compile_targets)) 402 compile_targets = sorted(set(compile_targets))
402 try: 403 try:
403 api.chromium.compile(compile_targets, name='compile (with patch)') 404 api.chromium.compile(compile_targets, name='compile (with patch)')
404 except api.step.StepFailure: 405 except api.step.StepFailure:
405 api.chromium_tests.deapply_patch(bot_update_step) 406 api.chromium_tests.deapply_patch(bot_update_step)
406 api.chromium.compile( 407 api.chromium.compile(
407 compile_targets, name='compile (without patch)') 408 compile_targets, name='compile (without patch)')
408 raise 409 raise
(...skipping 11 matching lines...) Expand all
420 421
421 mastername = api.properties.get('mastername') 422 mastername = api.properties.get('mastername')
422 buildername = api.properties.get('buildername') 423 buildername = api.properties.get('buildername')
423 api.chromium_tests.configure_swarming('chromium', precommit=True) 424 api.chromium_tests.configure_swarming('chromium', precommit=True)
424 425
425 tests, bot_update_step = compile_and_return_tests( 426 tests, bot_update_step = compile_and_return_tests(
426 mastername, buildername) 427 mastername, buildername)
427 428
428 def deapply_patch_fn(failing_tests): 429 def deapply_patch_fn(failing_tests):
429 api.chromium_tests.deapply_patch(bot_update_step) 430 api.chromium_tests.deapply_patch(bot_update_step)
430 compile_targets = sorted(list(set(api.itertools.chain( 431 compile_targets = sorted(list(set(itertools.chain(
431 *[t.compile_targets(api) for t in failing_tests])))) 432 *[t.compile_targets(api) for t in failing_tests]))))
432 if compile_targets: 433 if compile_targets:
433 api.chromium.compile( 434 api.chromium.compile(
434 compile_targets, name='compile (without patch)') 435 compile_targets, name='compile (without patch)')
435 436
436 return api.test_utils.determine_new_failures(api, tests, deapply_patch_fn) 437 return api.test_utils.determine_new_failures(api, tests, deapply_patch_fn)
437 438
438 439
439 def RunSteps(api): 440 def RunSteps(api):
440 with api.tryserver.set_failure_hash(): 441 with api.tryserver.set_failure_hash():
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 'test': 'base_tests', 850 'test': 'base_tests',
850 'args': ['--gtest-filter: *NaCl*.*'], 851 'args': ['--gtest-filter: *NaCl*.*'],
851 }, 852 },
852 ], 853 ],
853 }) 854 })
854 ) + 855 ) +
855 api.override_step_data( 856 api.override_step_data(
856 'analyze', 857 'analyze',
857 api.json.output({'invalid_targets': ['invalid target', 'another one']})) 858 api.json.output({'invalid_targets': ['invalid target', 'another one']}))
858 ) 859 )
OLDNEW
« no previous file with comments | « scripts/slave/recipes/chromium_trybot.py ('k') | scripts/slave/recipes/cronet.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698