| 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_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() |
| 37 def webrtc_android_apk_try_builder(c): |
| 38 """ Trybot building WebRTC native tests for Android as APKs.""" |
| 39 c.patch_root_dir = Path('[CHECKOUT]', 'third_party', 'webrtc') |
| 40 c.patch_filter_script = Path('[BUILD]', 'scripts', 'slave', |
| 41 'patch_path_filter.py') |
| 42 c.patch_path_filter = 'webrtc/' |
| 43 c.patch_strip_level = 1 |
| OLD | NEW |