Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: scripts/slave/recipe_modules/chromium_android/api.py

Issue 23889036: Refactor the way that TestApi works so that it is actually useful. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Yeeeeaaaahhhhhh! Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 import recipe_api 5 from slave import recipe_api
6 6
7 class AndroidApi(recipe_api.RecipeApi): 7 class AndroidApi(recipe_api.RecipeApi):
8 def __init__(self, **kwargs): 8 def __init__(self, **kwargs):
9 super(AndroidApi, self).__init__(**kwargs) 9 super(AndroidApi, self).__init__(**kwargs)
10 10
(...skipping 15 matching lines...) Expand all
26 REPO_URL=repo_url, 26 REPO_URL=repo_url,
27 BUILD_CONFIG=target) 27 BUILD_CONFIG=target)
28 28
29 # TODO(sivachandra): Move the setting of the gclient spec below to an 29 # TODO(sivachandra): Move the setting of the gclient spec below to an
30 # internal config extension when they are supported by the recipe system. 30 # internal config extension when they are supported by the recipe system.
31 spec = self.m.gclient.make_config('android_bare') 31 spec = self.m.gclient.make_config('android_bare')
32 spec.target_os = ['android'] 32 spec.target_os = ['android']
33 s = spec.solutions[0] 33 s = spec.solutions[0]
34 s.name = repo_name 34 s.name = repo_name
35 s.url = repo_url 35 s.url = repo_url
36 s.custom_vars = self.c.custom_vars
iannucci 2013/09/19 21:28:19 I took this out because it wasn't working (not sur
37 s.custom_deps = gclient_custom_deps or {} 36 s.custom_deps = gclient_custom_deps or {}
38 if revision: 37 if revision:
39 s.revision = revision 38 s.revision = revision
40 else: 39 else:
41 s.revision = 'refs/remotes/origin/master' 40 s.revision = 'refs/remotes/origin/master'
42 41
43 yield self.m.gclient.checkout(spec) 42 yield self.m.gclient.checkout(spec)
44 43
45 # TODO(sivachandra): Manufacture gclient spec such that it contains "src" 44 # TODO(sivachandra): Manufacture gclient spec such that it contains "src"
46 # solution + repo_name solution. Then checkout will be automatically 45 # solution + repo_name solution. Then checkout will be automatically
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 116
118 def run_tree_truth(self, show_revisions=False): 117 def run_tree_truth(self, show_revisions=False):
119 # TODO(sivachandra): The downstream ToT builder will require 118 # TODO(sivachandra): The downstream ToT builder will require
120 # 'Show Revisions' step. 119 # 'Show Revisions' step.
121 repos = ['src', 'src-internal'] 120 repos = ['src', 'src-internal']
122 if self.c.REPO_NAME not in repos: 121 if self.c.REPO_NAME not in repos:
123 repos.append(self.c.REPO_NAME) 122 repos.append(self.c.REPO_NAME)
124 # TODO(sivachandra): Disable subannottations after cleaning up 123 # TODO(sivachandra): Disable subannottations after cleaning up
125 # tree_truth.sh. 124 # tree_truth.sh.
126 yield self.m.step('Tree Truth Steps', 125 yield self.m.step('Tree Truth Steps',
127 [self.m.path.checkout('build', 'tree_truth.sh'), 126 [self.m.path.checkout('build', 'tree_truth.sh'),
128 self.m.path.checkout()] + repos, 127 self.m.path.checkout()] + repos,
129 allow_subannottations=True) 128 allow_subannottations=True)
130 129
131 def runhooks(self): 130 def runhooks(self):
132 return self.m.gclient.runhooks(env=self.env) 131 return self.m.gclient.runhooks(env=self.env)
133 132
134 def compile(self, target='Debug'): 133 def compile(self, target='Debug'):
135 return self.m.chromium.compile(env=self.env) 134 return self.m.chromium.compile(env=self.env)
136 135
137 def findbugs(self): 136 def findbugs(self):
138 cmd = [self.m.path.checkout('build', 'android', 'findbugs_diff.py')] 137 cmd = [self.m.path.checkout('build', 'android', 'findbugs_diff.py')]
139 if self.c.INTERNAL: 138 if self.c.INTERNAL:
140 cmd.extend( 139 cmd.extend(
141 ['-b', 140 ['-b',
142 self.m.path.checkout(self.internal_dir, 'bin', 'findbugs_filter'), 141 self.m.path.checkout(self.internal_dir, 'bin', 'findbugs_filter'),
143 '-o', 'com.google.android.apps.chrome.-,org.chromium.-']) 142 '-o', 'com.google.android.apps.chrome.-,org.chromium.-'])
144 143
145 return self.m.step('findbugs_internal', cmd, env=self.env) 144 return self.m.step('findbugs_internal', cmd, env=self.env)
146 145
147 def checkdeps(self): 146 def checkdeps(self):
148 return self.m.step( 147 return self.m.step(
149 'checkdeps', 148 'checkdeps',
150 [self.m.path.checkout('tools', 'checkdeps', 'checkdeps.py'), 149 [self.m.path.checkout('tools', 'checkdeps', 'checkdeps.py'),
151 '--root=%s' % self.internal_dir], 150 '--root=%s' % self.internal_dir],
152 env=self.env) 151 env=self.env)
153 152
154 def lint(self): 153 def lint(self):
155 if self.c.INTERNAL: 154 if self.c.INTERNAL:
156 return self.m.step( 155 return self.m.step(
157 'lint', 156 'lint',
158 [self.m.path.checkout(self.internal_dir, 'bin', 'lint.py')], 157 [self.m.path.checkout(self.internal_dir, 'bin', 'lint.py')],
159 env=self.env) 158 env=self.env)
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/chromium/config.py ('k') | scripts/slave/recipe_modules/chromium_android/config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698