| 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 28 matching lines...) Expand all Loading... |
| 39 if use_revision and 'revision' in self.m.properties: | 39 if use_revision and 'revision' in self.m.properties: |
| 40 svn_revision = str(self.m.properties['revision']) | 40 svn_revision = str(self.m.properties['revision']) |
| 41 | 41 |
| 42 spec = self.m.gclient.make_config('chromium_empty') | 42 spec = self.m.gclient.make_config('chromium_empty') |
| 43 spec.solutions[0].revision = svn_revision | 43 spec.solutions[0].revision = svn_revision |
| 44 self.m.gclient.spec_alias = 'empty_deps' | 44 self.m.gclient.spec_alias = 'empty_deps' |
| 45 yield self.m.gclient.checkout(spec) | 45 yield self.m.gclient.checkout(spec) |
| 46 | 46 |
| 47 yield self.m.step( | 47 yield self.m.step( |
| 48 'calculate trimmed deps', | 48 'calculate trimmed deps', |
| 49 [self.m.path.checkout('android_webview', 'buildbot', 'deps_whitelist.py'), | 49 [ |
| 50 '--method', 'android_build', | 50 self.m.path.checkout('android_webview', 'buildbot', |
| 51 '--path-to-deps', self.m.path.checkout('DEPS'), | 51 'deps_whitelist.py'), |
| 52 self.m.json.output()]) | 52 '--method', 'android_build', |
| 53 '--path-to-deps', self.m.path.checkout('DEPS'), |
| 54 self.m.json.output() |
| 55 ], |
| 56 mock_fn=lambda: self.test_api.m.json.output({ |
| 57 'blacklist': { |
| 58 'src/blacklist/project/1': None, |
| 59 'src/blacklist/project/2': None, |
| 60 } |
| 61 }) |
| 62 ) |
| 53 | 63 |
| 54 spec = self.m.gclient.make_config('chromium_bare') | 64 spec = self.m.gclient.make_config('chromium_bare') |
| 55 deps_blacklist = self.m.step_history.last_step().json.output['blacklist'] | 65 deps_blacklist = self.m.step_history.last_step().json.output['blacklist'] |
| 56 spec.solutions[0].custom_deps = deps_blacklist | 66 spec.solutions[0].custom_deps = deps_blacklist |
| 57 spec.solutions[0].revision = svn_revision | 67 spec.solutions[0].revision = svn_revision |
| 58 spec.target_os = ['android'] | 68 spec.target_os = ['android'] |
| 59 self.m.gclient.spec_alias = 'trimmed' | 69 self.m.gclient.spec_alias = 'trimmed' |
| 60 yield self.m.gclient.checkout(spec) | 70 yield self.m.gclient.checkout(spec) |
| 61 del self.m.gclient.spec_alias | 71 del self.m.gclient.spec_alias |
| 62 | 72 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 envsetup + | 150 envsetup + |
| 141 compile_script + | 151 compile_script + |
| 142 targets + | 152 targets + |
| 143 ['--build-dir', self.m.path.slave_build()] + | 153 ['--build-dir', self.m.path.slave_build()] + |
| 144 ['--src-dir', src_dir] + | 154 ['--src-dir', src_dir] + |
| 145 ['--build-tool', build_tool] + | 155 ['--build-tool', build_tool] + |
| 146 ['--verbose'] + | 156 ['--verbose'] + |
| 147 compiler_option, | 157 compiler_option, |
| 148 cwd=self.m.path.slave_build()) | 158 cwd=self.m.path.slave_build()) |
| 149 | 159 |
| OLD | NEW |