Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from slave.recipe_config import config_item_context, ConfigGroup | |
| 6 from slave.recipe_config import Single, Static | |
| 7 from slave.recipe_config_types import Path | |
| 8 | |
| 9 | |
| 10 def BaseConfig(ANDROID_APK=True, **_kwargs): | |
| 11 return ConfigGroup( | |
| 12 ANDROID_APK = Static(bool(ANDROID_APK)), | |
| 13 | |
| 14 patch_root_dir = Single(Path, required=False, empty_val=Path('[CHECKOUT]')), | |
| 15 | |
| 16 # Allow manipulating patches for try jobs. | |
| 17 patch_path_filter_script = Single(Path, required=False), | |
| 18 patch_path_filter = Single(basestring, required=False), | |
| 19 patch_strip_level = Single(int, required=False, empty_val=0), | |
| 20 ) | |
| 21 | |
| 22 VAR_TEST_MAP = { | |
| 23 'ANDROID_APK': (True, False), | |
| 24 } | |
| 25 | |
| 26 | |
| 27 def TEST_NAME_FORMAT(kwargs): | |
| 28 name = 'webrtc' | |
| 29 if kwargs['ANDROID_APK']: | |
| 30 name += '-android_apk' | |
| 31 return name | |
| 32 | |
| 33 config_ctx = config_item_context(BaseConfig, VAR_TEST_MAP, TEST_NAME_FORMAT) | |
| 34 | |
| 35 | |
| 36 @config_ctx(is_root=True) | |
| 37 def BASE(c): | |
| 38 pass | |
|
iannucci
2013/11/21 00:33:59
You can omit this method entirely. root configs ar
kjellander_chromium
2013/11/22 12:49:09
Done.
| |
| 39 | |
| 40 | |
| 41 @config_ctx() | |
| 42 def webrtc_android_apk_try_builder(c): | |
| 43 """ Trybot building WebRTC native tests for Android as APKs.""" | |
| 44 c.patch_root_dir = Path('[CHECKOUT]', 'third_party', 'webrtc') | |
| 45 c.patch_path_filter_script = Path('[BUILD]', 'scripts', 'slave', | |
| 46 'patch_path_filter.py') | |
| 47 c.patch_path_filter = 'webrtc/' | |
| 48 c.patch_strip_level = 1 | |
| OLD | NEW |