| OLD | NEW |
| 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 from RECIPE_MODULES.gclient import CONFIG_CTX | 5 from RECIPE_MODULES.gclient import CONFIG_CTX |
| 6 from slave.recipe_modules.gclient.config import ChromeSvnSubURL,\ | 6 from slave.recipe_modules.gclient.config import ChromeSvnSubURL,\ |
| 7 ChromiumSvnSubURL | 7 ChromiumSvnSubURL |
| 8 | 8 |
| 9 | 9 |
| 10 @CONFIG_CTX(includes=['_webrtc', '_webrtc_limited']) | 10 @CONFIG_CTX(includes=['_webrtc', '_webrtc_limited']) |
| 11 def webrtc(c): | 11 def webrtc(c): |
| 12 pass | 12 pass |
| 13 | 13 |
| 14 | |
| 15 @CONFIG_CTX(includes=['webrtc']) | 14 @CONFIG_CTX(includes=['webrtc']) |
| 16 def webrtc_clang(c): | 15 def webrtc_clang(c): |
| 17 pass | 16 pass |
| 18 | 17 |
| 19 | |
| 20 @CONFIG_CTX(includes=['webrtc']) | 18 @CONFIG_CTX(includes=['webrtc']) |
| 21 def webrtc_asan(c): | 19 def webrtc_asan(c): |
| 22 pass | 20 pass |
| 23 | 21 |
| 24 | |
| 25 @CONFIG_CTX(includes=['webrtc']) | 22 @CONFIG_CTX(includes=['webrtc']) |
| 26 def webrtc_lsan(c): | 23 def webrtc_lsan(c): |
| 27 pass | 24 pass |
| 28 | 25 |
| 29 | |
| 30 @CONFIG_CTX(includes=['webrtc', 'android']) | 26 @CONFIG_CTX(includes=['webrtc', 'android']) |
| 31 def webrtc_android(c): | 27 def webrtc_android(c): |
| 32 pass | 28 pass |
| 33 | 29 |
| 34 | |
| 35 @CONFIG_CTX(includes=['webrtc_android']) | 30 @CONFIG_CTX(includes=['webrtc_android']) |
| 36 def webrtc_android_clang(c): | 31 def webrtc_android_clang(c): |
| 37 pass | 32 pass |
| 38 | 33 |
| 39 | |
| 40 @CONFIG_CTX(includes=['chromium', 'android', '_webrtc_limited', | |
| 41 '_webrtc_deps', '_webrtc_tot_in_chromium']) | |
| 42 def webrtc_android_apk(c): | |
| 43 pass | |
| 44 | |
| 45 | |
| 46 @CONFIG_CTX(includes=['webrtc']) | 34 @CONFIG_CTX(includes=['webrtc']) |
| 47 def webrtc_ios(c): | 35 def webrtc_ios(c): |
| 48 # WebRTC for iOS depends on the src/third_party/openmax_dl in Chromium, which | 36 # WebRTC for iOS depends on the src/third_party/openmax_dl in Chromium, which |
| 49 # is set to None for iOS. Because of this, sync Mac as well to get it. | 37 # is set to None for iOS. Because of this, sync Mac as well to get it. |
| 50 c.target_os.add('mac') | 38 c.target_os.add('mac') |
| 51 c.target_os.add('ios') | 39 c.target_os.add('ios') |
| 52 | 40 |
| 53 | |
| 54 @CONFIG_CTX(includes=['webrtc']) | 41 @CONFIG_CTX(includes=['webrtc']) |
| 55 def valgrind(c): | 42 def valgrind(c): |
| 56 """Add Valgrind binaries dependency for WebRTC. | 43 """Add Valgrind binaries dependency for WebRTC. |
| 57 | 44 |
| 58 Since WebRTC DEPS is using relative paths, it it not possible to use a generic | 45 Since WebRTC DEPS is using relative paths, it it not possible to use a generic |
| 59 valgrind config in the gclient recipe module. | 46 valgrind config in the gclient recipe module. |
| 60 """ | 47 """ |
| 61 c.solutions[0].custom_deps['chromium/src/third_party/valgrind'] = \ | 48 c.solutions[0].custom_deps['chromium/src/third_party/valgrind'] = \ |
| 62 ChromiumSvnSubURL(c, 'chrome', 'trunk', 'deps', 'third_party', 'valgrind', | 49 ChromiumSvnSubURL(c, 'chrome', 'trunk', 'deps', 'third_party', 'valgrind', |
| 63 'binaries') | 50 'binaries') |
| 64 | 51 |
| 65 | |
| 66 @CONFIG_CTX(includes=['webrtc']) | 52 @CONFIG_CTX(includes=['webrtc']) |
| 67 def tsan_win(c): | 53 def tsan_win(c): |
| 68 """Add TSan Windows binaries dependency for WebRTC. | 54 """Add TSan Windows binaries dependency for WebRTC. |
| 69 | 55 |
| 70 Since WebRTC DEPS is using relative paths, it it not possible to use a generic | 56 Since WebRTC DEPS is using relative paths, it it not possible to use a generic |
| 71 tsan config in the gclient recipe module. | 57 tsan config in the gclient recipe module. |
| 72 """ | 58 """ |
| 73 c.solutions[0].custom_deps['chromium/src/third_party/tsan'] = \ | 59 c.solutions[0].custom_deps['chromium/src/third_party/tsan'] = \ |
| 74 ChromiumSvnSubURL(c, 'chrome', 'trunk', 'deps', 'third_party', 'tsan') | 60 ChromiumSvnSubURL(c, 'chrome', 'trunk', 'deps', 'third_party', 'tsan') |
| 75 | 61 |
| 76 | |
| 77 @CONFIG_CTX(includes=['chromium', '_webrtc_deps']) | 62 @CONFIG_CTX(includes=['chromium', '_webrtc_deps']) |
| 78 def chromium_webrtc(c): | 63 def chromium_webrtc(c): |
| 79 pass | 64 pass |
| 80 | 65 |
| 81 | |
| 82 @CONFIG_CTX(includes=['chromium', '_webrtc_deps', '_webrtc_tot_in_chromium']) | 66 @CONFIG_CTX(includes=['chromium', '_webrtc_deps', '_webrtc_tot_in_chromium']) |
| 83 def chromium_webrtc_tot(c): | 67 def chromium_webrtc_tot(c): |
| 84 pass | 68 pass |
| 85 | 69 |
| 86 | |
| 87 @CONFIG_CTX() | 70 @CONFIG_CTX() |
| 88 def _webrtc(c): | 71 def _webrtc(c): |
| 89 """Add the main solution for WebRTC standalone builds. | 72 """Add the main solution for WebRTC standalone builds. |
| 90 | 73 |
| 91 This needs to be in it's own configuration that is added first in the | 74 This needs to be in it's own configuration that is added first in the |
| 92 dependency chain. Otherwise the webrtc-limited solution will end up as the | 75 dependency chain. Otherwise the webrtc-limited solution will end up as the |
| 93 first solution in the gclient spec, which doesn't work. | 76 first solution in the gclient spec, which doesn't work. |
| 94 """ | 77 """ |
| 95 s = c.solutions.add() | 78 s = c.solutions.add() |
| 96 s.name = 'src' | 79 s.name = 'src' |
| 97 s.url = WebRTCSvnURL(c, 'trunk') | 80 s.url = WebRTCSvnURL(c, 'trunk') |
| 98 s.deps_file = 'DEPS' | 81 s.deps_file = 'DEPS' |
| 99 s.custom_vars['root_dir'] = 'src' | 82 s.custom_vars['root_dir'] = 'src' |
| 100 c.got_revision_mapping['src'] = 'got_revision' | 83 c.got_revision_mapping['src'] = 'got_revision' |
| 101 | 84 |
| 102 | |
| 103 @CONFIG_CTX() | 85 @CONFIG_CTX() |
| 104 def _webrtc_deps(c): | 86 def _webrtc_deps(c): |
| 105 """Add webrtc.DEPS solution for test resources and tools. | 87 """Add webrtc.DEPS solution for test resources and tools. |
| 106 | 88 |
| 107 The webrtc.DEPS solution pulls in additional resources needed for running | 89 The webrtc.DEPS solution pulls in additional resources needed for running |
| 108 WebRTC-specific test setups in Chromium. | 90 WebRTC-specific test setups in Chromium. |
| 109 """ | 91 """ |
| 110 s = c.solutions.add() | 92 s = c.solutions.add() |
| 111 s.name = 'webrtc.DEPS' | 93 s.name = 'webrtc.DEPS' |
| 112 s.url = ChromiumSvnSubURL(c, 'chrome', 'trunk', 'deps', 'third_party', | 94 s.url = ChromiumSvnSubURL(c, 'chrome', 'trunk', 'deps', 'third_party', |
| 113 'webrtc', 'webrtc.DEPS') | 95 'webrtc', 'webrtc.DEPS') |
| 114 s.deps_file = 'DEPS' | 96 s.deps_file = 'DEPS' |
| 115 | 97 |
| 116 | |
| 117 # Needs to depend on 'chromium' in order to pass recipe_configs_test.py. | 98 # Needs to depend on 'chromium' in order to pass recipe_configs_test.py. |
| 118 @CONFIG_CTX(includes=['chromium']) | 99 @CONFIG_CTX(includes=['chromium']) |
| 119 def _webrtc_tot_in_chromium(c): | 100 def _webrtc_tot_in_chromium(c): |
| 120 """Configures src/third_party/webrtc to be the revision decider. | 101 """Configures src/third_party/webrtc to be the revision decider. |
| 121 | 102 |
| 122 WebRTC's Android APK tests are built from a Chromium checkout with | 103 WebRTC's Android APK tests are built from a Chromium checkout with |
| 123 src/third_party/webrtc replaced with ToT instead of the DEPS-pinned revision. | 104 src/third_party/webrtc replaced with ToT instead of the DEPS-pinned revision. |
| 124 There are also similar Chromium builders and testers used to catch pre-roll | 105 There are also similar Chromium builders and testers used to catch pre-roll |
| 125 test failures for new WebRTC revisions. | 106 test failures for new WebRTC revisions. |
| 126 """ | 107 """ |
| 127 # Have the WebRTC revision appear in the web UI instead of Chromium's. | 108 # Have the WebRTC revision appear in the web UI instead of Chromium's. |
| 128 del c.got_revision_mapping['src'] | 109 del c.got_revision_mapping['src'] |
| 129 c.got_revision_mapping['src/third_party/webrtc'] = 'got_revision' | 110 c.got_revision_mapping['src/third_party/webrtc'] = 'got_revision' |
| 130 # Needed to get the testers to properly sync the right revision. | 111 # Needed to get the testers to properly sync the right revision. |
| 131 c.parent_got_revision_mapping['parent_got_revision'] = 'got_revision' | 112 c.parent_got_revision_mapping['parent_got_revision'] = 'got_revision' |
| 132 | 113 |
| 133 | |
| 134 @CONFIG_CTX() | 114 @CONFIG_CTX() |
| 135 def _webrtc_limited(c): | 115 def _webrtc_limited(c): |
| 136 """Helper config for loading the webrtc-limited solution. | 116 """Helper config for loading the webrtc-limited solution. |
| 137 | 117 |
| 138 The webrtc-limited solution contains non-redistributable code. | 118 The webrtc-limited solution contains non-redistributable code. |
| 139 """ | 119 """ |
| 140 s = c.solutions.add() | 120 s = c.solutions.add() |
| 141 s.name = 'webrtc-limited' | 121 s.name = 'webrtc-limited' |
| 142 s.url = ChromeSvnSubURL(c, 'chrome-internal', 'trunk', 'webrtc-limited') | 122 s.url = ChromeSvnSubURL(c, 'chrome-internal', 'trunk', 'webrtc-limited') |
| 143 s.deps_file = 'DEPS' | 123 s.deps_file = 'DEPS' |
| 144 s.custom_vars['root_dir'] = 'src' | 124 s.custom_vars['root_dir'] = 'src' |
| 145 | 125 |
| 146 | |
| 147 def WebRTCSvnURL(c, *pieces): | 126 def WebRTCSvnURL(c, *pieces): |
| 148 BASES = ('http://webrtc.googlecode.com/svn', | 127 BASES = ('http://webrtc.googlecode.com/svn', |
| 149 'svn://svn-mirror.golo.chromium.org/webrtc') | 128 'svn://svn-mirror.golo.chromium.org/webrtc') |
| 150 return '/'.join((BASES[c.USE_MIRROR],) + pieces) | 129 return '/'.join((BASES[c.USE_MIRROR],) + pieces) |
| OLD | NEW |