| 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 """Common steps for recipes that sync/build Android sources.""" | 5 """Common steps for recipes that sync/build Android sources.""" |
| 6 | 6 |
| 7 from slave import recipe_api | 7 from slave import recipe_api |
| 8 | 8 |
| 9 class AOSPApi(recipe_api.RecipeApi): | 9 class AOSPApi(recipe_api.RecipeApi): |
| 10 def __init__(self, **kwargs): | 10 def __init__(self, **kwargs): |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 @property | 27 @property |
| 28 def slave_android_out_path(self): | 28 def slave_android_out_path(self): |
| 29 return self.m.path.slave_build(self.SLAVE_ANDROID_ROOT_NAME, 'out') | 29 return self.m.path.slave_build(self.SLAVE_ANDROID_ROOT_NAME, 'out') |
| 30 | 30 |
| 31 @property | 31 @property |
| 32 def with_lunch_command(self): | 32 def with_lunch_command(self): |
| 33 return [self.m.path.build('scripts', 'slave', 'android', 'with_lunch'), | 33 return [self.m.path.build('scripts', 'slave', 'android', 'with_lunch'), |
| 34 self.build_path, | 34 self.build_path, |
| 35 self.c.lunch_flavor] | 35 self.c.lunch_flavor] |
| 36 | 36 |
| 37 @recipe_api.inject_test_data |
| 38 def calculate_trimmed_deps(self): |
| 39 return self.m.step( |
| 40 'calculate trimmed deps', |
| 41 [ |
| 42 self.m.path.checkout('android_webview', 'buildbot', |
| 43 'deps_whitelist.py'), |
| 44 '--method', 'android_build', |
| 45 '--path-to-deps', self.m.path.checkout('DEPS'), |
| 46 self.m.json.output() |
| 47 ], |
| 48 ) |
| 49 |
| 37 def chromium_with_trimmed_deps(self, use_revision=True): | 50 def chromium_with_trimmed_deps(self, use_revision=True): |
| 38 svn_revision = None | 51 svn_revision = None |
| 39 if use_revision and 'revision' in self.m.properties: | 52 if use_revision and 'revision' in self.m.properties: |
| 40 svn_revision = str(self.m.properties['revision']) | 53 svn_revision = str(self.m.properties['revision']) |
| 41 | 54 |
| 42 spec = self.m.gclient.make_config('chromium_empty') | 55 spec = self.m.gclient.make_config('chromium_empty') |
| 43 spec.solutions[0].revision = svn_revision | 56 spec.solutions[0].revision = svn_revision |
| 44 self.m.gclient.spec_alias = 'empty_deps' | 57 self.m.gclient.spec_alias = 'empty_deps' |
| 45 yield self.m.gclient.checkout(spec) | 58 yield self.m.gclient.checkout(spec) |
| 46 | 59 |
| 47 yield self.m.step( | 60 yield self.calculate_trimmed_deps() |
| 48 'calculate trimmed deps', | |
| 49 [self.m.path.checkout('android_webview', 'buildbot', 'deps_whitelist.py'), | |
| 50 '--method', 'android_build', | |
| 51 '--path-to-deps', self.m.path.checkout('DEPS'), | |
| 52 self.m.json.output()]) | |
| 53 | 61 |
| 54 spec = self.m.gclient.make_config('chromium_bare') | 62 spec = self.m.gclient.make_config('chromium_bare') |
| 55 deps_blacklist = self.m.step_history.last_step().json.output['blacklist'] | 63 deps_blacklist = self.m.step_history.last_step().json.output['blacklist'] |
| 56 spec.solutions[0].custom_deps = deps_blacklist | 64 spec.solutions[0].custom_deps = deps_blacklist |
| 57 spec.solutions[0].revision = svn_revision | 65 spec.solutions[0].revision = svn_revision |
| 58 spec.target_os = ['android'] | 66 spec.target_os = ['android'] |
| 59 self.m.gclient.spec_alias = 'trimmed' | 67 self.m.gclient.spec_alias = 'trimmed' |
| 60 yield self.m.gclient.checkout(spec) | 68 yield self.m.gclient.checkout(spec) |
| 61 del self.m.gclient.spec_alias | 69 del self.m.gclient.spec_alias |
| 62 | 70 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 envsetup + | 148 envsetup + |
| 141 compile_script + | 149 compile_script + |
| 142 targets + | 150 targets + |
| 143 ['--build-dir', self.m.path.slave_build()] + | 151 ['--build-dir', self.m.path.slave_build()] + |
| 144 ['--src-dir', src_dir] + | 152 ['--src-dir', src_dir] + |
| 145 ['--build-tool', build_tool] + | 153 ['--build-tool', build_tool] + |
| 146 ['--verbose'] + | 154 ['--verbose'] + |
| 147 compiler_option, | 155 compiler_option, |
| 148 cwd=self.m.path.slave_build()) | 156 cwd=self.m.path.slave_build()) |
| 149 | 157 |
| OLD | NEW |