| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 recipe_engine.types import freeze | 5 from recipe_engine.types import freeze |
| 6 | 6 |
| 7 | 7 |
| 8 DEPS = [ | 8 DEPS = [ |
| 9 'depot_tools/bot_update', | 9 'depot_tools/bot_update', |
| 10 'chromium', | 10 'chromium', |
| 11 'recipe_engine/step', | 11 'recipe_engine/step', |
| 12 'webrtc', | 12 'webrtc', |
| 13 ] | 13 ] |
| 14 | 14 |
| 15 RECIPE_CONFIGS = freeze({ | 15 RECIPE_CONFIGS = freeze({ |
| 16 'webrtc_minimal': { | 16 'webrtc_minimal': { |
| 17 'chromium_config': 'webrtc_minimal', | 17 'chromium_config': 'webrtc_minimal', |
| 18 'gclient_config': 'webrtc', | 18 'gclient_config': 'webrtc', |
| 19 }, | 19 }, |
| 20 'webrtc_android_minimal': { |
| 21 'chromium_config': 'android', |
| 22 'gclient_config': 'webrtc', |
| 23 'gclient_apply_config': ['android'], |
| 24 }, |
| 20 }) | 25 }) |
| 21 | 26 |
| 22 BUILDERS = freeze({ | 27 BUILDERS = freeze({ |
| 23 'client.webrtc': { | 28 'client.webrtc': { |
| 24 'builders': { | 29 'builders': { |
| 25 'Linux (more configs)': { | 30 'Linux (more configs)': { |
| 26 'recipe_config': 'webrtc_minimal', | 31 'recipe_config': 'webrtc_minimal', |
| 27 'chromium_config_kwargs': { | 32 'chromium_config_kwargs': { |
| 28 'BUILD_CONFIG': 'Debug', | 33 'BUILD_CONFIG': 'Debug', |
| 29 'TARGET_BITS': 64, | 34 'TARGET_BITS': 64, |
| 30 }, | 35 }, |
| 31 'bot_type': 'builder', | 36 'bot_type': 'builder', |
| 32 'testing': {'platform': 'linux'}, | 37 'testing': {'platform': 'linux'}, |
| 33 }, | 38 }, |
| 39 'Android32 (more configs)': { |
| 40 'recipe_config': 'webrtc_android_minimal', |
| 41 'chromium_config_kwargs': { |
| 42 'BUILD_CONFIG': 'Debug', |
| 43 'TARGET_PLATFORM': 'android', |
| 44 'TARGET_ARCH': 'arm', |
| 45 'TARGET_BITS': 32, |
| 46 }, |
| 47 'bot_type': 'builder', |
| 48 'testing': {'platform': 'linux'}, |
| 49 }, |
| 34 }, | 50 }, |
| 35 }, | 51 }, |
| 36 'tryserver.webrtc': { | 52 'tryserver.webrtc': { |
| 37 'builders': { | 53 'builders': { |
| 38 'linux_more_configs': { | 54 'linux_more_configs': { |
| 39 'recipe_config': 'webrtc_minimal', | 55 'recipe_config': 'webrtc_minimal', |
| 40 'chromium_config_kwargs': { | 56 'chromium_config_kwargs': { |
| 41 'BUILD_CONFIG': 'Debug', | 57 'BUILD_CONFIG': 'Debug', |
| 42 'TARGET_BITS': 64, | 58 'TARGET_BITS': 64, |
| 43 }, | 59 }, |
| 44 'bot_type': 'builder', | 60 'bot_type': 'builder', |
| 45 'testing': {'platform': 'linux'}, | 61 'testing': {'platform': 'linux'}, |
| 46 }, | 62 }, |
| 63 'android_more_configs': { |
| 64 'recipe_config': 'webrtc_android_minimal', |
| 65 'chromium_config_kwargs': { |
| 66 'BUILD_CONFIG': 'Debug', |
| 67 'TARGET_PLATFORM': 'android', |
| 68 'TARGET_ARCH': 'arm', |
| 69 'TARGET_BITS': 32, |
| 70 }, |
| 71 'bot_type': 'builder', |
| 72 'testing': {'platform': 'linux'}, |
| 73 }, |
| 47 }, | 74 }, |
| 48 }, | 75 }, |
| 49 }) | 76 }) |
| 50 | 77 |
| 51 | 78 |
| 52 def BuildSteps(api, gn_arg=None, name=None): | 79 def BuildSteps(api, gn_arg=None, name=None): |
| 53 if gn_arg: | 80 if gn_arg: |
| 54 assert isinstance(gn_arg, basestring) | 81 assert isinstance(gn_arg, basestring) |
| 55 api.chromium.c.gn_args = [gn_arg] if gn_arg else [] | 82 api.chromium.c.gn_args = [gn_arg] if gn_arg else [] |
| 56 api.chromium.run_gn(use_goma=True) | 83 api.chromium.run_gn(use_goma=True) |
| 57 api.step.active_result.presentation.step_text = 'gn (%s)' % (name or gn_arg) | 84 api.step.active_result.presentation.step_text = 'gn (%s)' % (name or gn_arg) |
| 58 api.chromium.compile() | 85 api.chromium.compile() |
| 59 | 86 |
| 60 | 87 |
| 61 def RunSteps(api): | 88 def RunSteps(api): |
| 62 webrtc = api.webrtc | 89 webrtc = api.webrtc |
| 63 webrtc.apply_bot_config(BUILDERS, RECIPE_CONFIGS) | 90 webrtc.apply_bot_config(BUILDERS, RECIPE_CONFIGS) |
| 64 | 91 |
| 65 api.webrtc.checkout() | 92 api.webrtc.checkout() |
| 66 api.chromium.ensure_goma() | 93 api.chromium.ensure_goma() |
| 67 api.chromium.runhooks() | 94 api.chromium.runhooks() |
| 68 | 95 |
| 69 BuildSteps(api, name='minimal') | 96 BuildSteps(api, name='minimal') |
| 70 BuildSteps(api, gn_arg='rtc_enable_intelligibility_enhancer=true') | 97 BuildSteps(api, gn_arg='rtc_enable_intelligibility_enhancer=true') |
| 71 | 98 |
| 72 | 99 |
| 73 def GenTests(api): | 100 def GenTests(api): |
| 74 for test in api.chromium.gen_tests_for_builders(BUILDERS): | 101 for test in api.chromium.gen_tests_for_builders(BUILDERS): |
| 75 yield test | 102 yield test |
| OLD | NEW |