| 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 slave.recipe_config import config_item_context, ConfigGroup | 5 from slave.recipe_config import config_item_context, ConfigGroup |
| 6 from slave.recipe_config import Dict, Single, Static | 6 from slave.recipe_config import Dict, Single, Static |
| 7 from slave.recipe_config_types import Path |
| 7 | 8 |
| 8 def BaseConfig(INTERNAL, REPO_NAME, REPO_URL, **_kwargs): | 9 def BaseConfig(INTERNAL, REPO_NAME, REPO_URL, **_kwargs): |
| 9 return ConfigGroup( | 10 return ConfigGroup( |
| 10 INTERNAL = Static(INTERNAL), | 11 INTERNAL = Static(INTERNAL), |
| 11 REPO_NAME = Static(REPO_NAME), | 12 REPO_NAME = Static(REPO_NAME), |
| 12 REPO_URL = Static(REPO_URL), | 13 REPO_URL = Static(REPO_URL), |
| 13 target_arch = Single(basestring, required=False, empty_val=''), | 14 target_arch = Single(basestring, required=False, empty_val=''), |
| 14 extra_env = Dict(value_type=(basestring,int,list)), | 15 extra_env = Dict(value_type=(basestring,int,Path)), |
| 15 run_findbugs = Single(bool, required=False, empty_val=False), | 16 run_findbugs = Single(bool, required=False, empty_val=False), |
| 16 run_lint = Single(bool, required=False, empty_val=False), | 17 run_lint = Single(bool, required=False, empty_val=False), |
| 17 run_checkdeps = Single(bool, required=False, empty_val=False), | 18 run_checkdeps = Single(bool, required=False, empty_val=False), |
| 18 apply_svn_patch = Single(bool, required=False, empty_val=False) | 19 apply_svn_patch = Single(bool, required=False, empty_val=False), |
| 20 build_internal_android = Static(Path('build_internal', |
| 21 ('scripts', 'slave', 'android'))) |
| 19 ) | 22 ) |
| 20 | 23 |
| 21 | 24 |
| 22 VAR_TEST_MAP = { | 25 VAR_TEST_MAP = { |
| 23 'INTERNAL': [True, False], | 26 'INTERNAL': [True, False], |
| 24 'REPO_NAME': ['src', 'internal'], | 27 'REPO_NAME': ['src', 'internal'], |
| 25 'REPO_URL': ['bob_dot_org', 'mike_dot_org'], | 28 'REPO_URL': ['bob_dot_org', 'mike_dot_org'], |
| 26 } | 29 } |
| 27 | 30 |
| 28 def TEST_NAME_FORMAT(kwargs): | 31 def TEST_NAME_FORMAT(kwargs): |
| (...skipping 21 matching lines...) Expand all Loading... |
| 50 pass | 53 pass |
| 51 | 54 |
| 52 @config_ctx() | 55 @config_ctx() |
| 53 def x86_builder(c): | 56 def x86_builder(c): |
| 54 c.target_arch = 'x86' | 57 c.target_arch = 'x86' |
| 55 | 58 |
| 56 @config_ctx() | 59 @config_ctx() |
| 57 def klp_builder(c): | 60 def klp_builder(c): |
| 58 c.extra_env = { | 61 c.extra_env = { |
| 59 'ANDROID_SDK_BUILD_TOOLS_VERSION': 'android-KeyLimePie', | 62 'ANDROID_SDK_BUILD_TOOLS_VERSION': 'android-KeyLimePie', |
| 60 'ANDROID_SDK_ROOT': ['third_party', 'android_tools_internal', 'sdk'], | 63 'ANDROID_SDK_ROOT': Path( |
| 64 'checkout', ('third_party', 'android_tools_internal', 'sdk')), |
| 61 'ANDROID_SDK_VERSION': 'KeyLimePie' | 65 'ANDROID_SDK_VERSION': 'KeyLimePie' |
| 62 } | 66 } |
| 63 | 67 |
| 64 @config_ctx() | 68 @config_ctx() |
| 65 def try_builder(c): | 69 def try_builder(c): |
| 66 if c.INTERNAL: | 70 if c.INTERNAL: |
| 67 c.apply_svn_patch = True | 71 c.apply_svn_patch = True |
| 68 c.run_findbugs = True | 72 c.run_findbugs = True |
| 69 c.run_lint = True | 73 c.run_lint = True |
| 70 | 74 |
| 71 @config_ctx(includes=['x86_builder', 'try_builder']) | 75 @config_ctx(includes=['x86_builder', 'try_builder']) |
| 72 def x86_try_builder(c): | 76 def x86_try_builder(c): |
| 73 pass | 77 pass |
| OLD | NEW |