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

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

Issue 1588793002: Support variable substitution and tryserver- and waterfall-only cmd line args. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Addressed review feedback. Revised tests. Rebased. Created 4 years, 11 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 collections 5 import collections
6 6
7 from recipe_engine.types import freeze 7 from recipe_engine.types import freeze
8 8
9 DEPS = [ 9 DEPS = [
10 'amp', 10 'amp',
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 # TODO(sergiyb): This is a temporary hack to run GPU tests on tryserver 211 # TODO(sergiyb): This is a temporary hack to run GPU tests on tryserver
212 # only. This should be removed when we will convert chromium.gpu waterfall 212 # only. This should be removed when we will convert chromium.gpu waterfall
213 # to swarming and be able to replicate the tests to tryserver automatically. 213 # to swarming and be able to replicate the tests to tryserver automatically.
214 master = api.properties['mastername'] 214 master = api.properties['mastername']
215 builder = api.properties['buildername'] 215 builder = api.properties['buildername']
216 enable_gpu_tests = builder in CHROMIUM_GPU_DIMENSION_SETS.get(master, {}) 216 enable_gpu_tests = builder in CHROMIUM_GPU_DIMENSION_SETS.get(master, {})
217 217
218 bot_config_object = api.chromium_tests.create_generalized_bot_config_object( 218 bot_config_object = api.chromium_tests.create_generalized_bot_config_object(
219 bot_config['bot_ids']) 219 bot_config['bot_ids'])
220 api.chromium_tests.set_precommit_mode()
220 api.chromium_tests.configure_build( 221 api.chromium_tests.configure_build(
221 bot_config_object, override_bot_type='builder_tester') 222 bot_config_object, override_bot_type='builder_tester')
222 223
223 api.chromium_tests.configure_swarming('chromium', precommit=True) 224 api.chromium_tests.configure_swarming('chromium', precommit=True)
224 225
225 api.chromium.apply_config('trybot_flavor') 226 api.chromium.apply_config('trybot_flavor')
226 if enable_gpu_tests: 227 if enable_gpu_tests:
227 api.chromium.apply_config('archive_gpu_tests') 228 api.chromium.apply_config('archive_gpu_tests')
228 api.chromium.apply_config('chrome_with_codecs') 229 api.chromium.apply_config('chrome_with_codecs')
229 230
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 }, 470 },
470 })) + 471 })) +
471 suppress_analyze() + 472 suppress_analyze() +
472 api.override_step_data('base_unittests (with patch)', 473 api.override_step_data('base_unittests (with patch)',
473 canned_test(passing=False)) + 474 canned_test(passing=False)) +
474 api.override_step_data('base_unittests (without patch)', 475 api.override_step_data('base_unittests (without patch)',
475 api.test_utils.raw_gtest_output(None, retcode=1)) 476 api.test_utils.raw_gtest_output(None, retcode=1))
476 ) 477 )
477 478
478 yield ( 479 yield (
480 api.test('dynamic_isolated_script_test_with_args_on_trybot') +
481 props(extra_swarmed_tests=['telemetry_gpu_unittests']) +
482 api.platform.name('linux') +
483 api.override_step_data('read test spec', api.json.output({
484 'Linux Tests': {
485 'isolated_scripts': [
486 {
487 'isolate_name': 'telemetry_gpu_unittests',
488 'name': 'telemetry_gpu_unittests',
489 'args': ['--correct-common-arg'],
490 'non_precommit_args': [
491 '--SHOULD-NOT-BE-PRESENT-DURING-THE-RUN'
492 ],
493 'precommit_args': [
494 '--these-args-should-be-present',
495 '--test-machine-name=\"${buildername}\"',
496 '--build-revision=\"${got_revision}\"',
497 ],
498 'swarming': {'can_use_on_swarming_builders': True},
499 },
500 ],
501 },
502 })) +
503 suppress_analyze() +
504 api.override_step_data(
505 'telemetry_gpu_unittests (with patch)',
506 api.test_utils.canned_isolated_script_output(
507 passing=True, is_win=False, swarming=True))
508 )
509
510 yield (
479 api.test('swarming_trigger_failure') + 511 api.test('swarming_trigger_failure') +
480 props() + 512 props() +
481 api.platform.name('linux') + 513 api.platform.name('linux') +
482 api.override_step_data('read test spec', api.json.output({ 514 api.override_step_data('read test spec', api.json.output({
483 'Linux Tests': { 515 'Linux Tests': {
484 'gtest_tests': [ 516 'gtest_tests': [
485 { 517 {
486 'test': 'base_unittests', 518 'test': 'base_unittests',
487 'swarming': {'can_use_on_swarming_builders': True}, 519 'swarming': {'can_use_on_swarming_builders': True},
488 }, 520 },
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 props(mastername='tryserver.v8', 1100 props(mastername='tryserver.v8',
1069 buildername='v8_linux_blink_rel', 1101 buildername='v8_linux_blink_rel',
1070 patch_project='v8') + 1102 patch_project='v8') +
1071 api.platform.name('linux') + 1103 api.platform.name('linux') +
1072 suppress_analyze(more_exclusions=['v8/f.*']) + 1104 suppress_analyze(more_exclusions=['v8/f.*']) +
1073 api.override_step_data('webkit_tests (with patch)', 1105 api.override_step_data('webkit_tests (with patch)',
1074 api.test_utils.canned_test_output(passing=False)) + 1106 api.test_utils.canned_test_output(passing=False)) +
1075 api.override_step_data('webkit_tests (without patch)', 1107 api.override_step_data('webkit_tests (without patch)',
1076 api.test_utils.canned_test_output(passing=True, minimal=True)) 1108 api.test_utils.canned_test_output(passing=True, minimal=True))
1077 ) 1109 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698