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

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

Issue 170783015: recipes: Stop passing --target-arch to envsetup now that it's ignored. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 6 years, 10 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 self._env = dict() 10 self._env = dict()
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 yield self.m.step( 100 yield self.m.step(
101 'get_internal_names', 101 'get_internal_names',
102 [self.c.internal_dir('build', 'dump_internal_names.py'), 102 [self.c.internal_dir('build', 'dump_internal_names.py'),
103 '--output-json', self.m.json.output()] 103 '--output-json', self.m.json.output()]
104 ) 104 )
105 105
106 self._internal_names = self.m.step_history.last_step().json.output 106 self._internal_names = self.m.step_history.last_step().json.output
107 107
108 def envsetup(self): 108 def envsetup(self):
109 envsetup_cmd = [self.m.path.checkout('build', 'android', 'envsetup.sh')] 109 envsetup_cmd = [self.m.path.checkout('build', 'android', 'envsetup.sh')]
110 if self.target_arch:
111 envsetup_cmd += ['--target-arch=%s' % self.target_arch]
112 110
113 cmd = ([self.m.path.build('scripts', 'slave', 'env_dump.py'), 111 cmd = ([self.m.path.build('scripts', 'slave', 'env_dump.py'),
114 '--output-json', self.m.json.output()] + envsetup_cmd) 112 '--output-json', self.m.json.output()] + envsetup_cmd)
115 113
116 def update_self_env(step_result): 114 def update_self_env(step_result):
117 env_diff = step_result.json.output 115 env_diff = step_result.json.output
118 for key, value in env_diff.iteritems(): 116 for key, value in env_diff.iteritems():
119 if key.startswith('GYP_'): 117 if key.startswith('GYP_'):
120 continue 118 continue
121 else: 119 else:
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 [self.m.path.checkout('build', 'android', 'asan_symbolize.py'), 319 [self.m.path.checkout('build', 'android', 'asan_symbolize.py'),
322 '-l', log_file], always_run=True, env=self.get_env()) 320 '-l', log_file], always_run=True, env=self.get_env())
323 321
324 @property 322 @property
325 def target_arch(self): 323 def target_arch(self):
326 """Convert from recipe arch to android arch.""" 324 """Convert from recipe arch to android arch."""
327 return { 325 return {
328 'intel': 'x86', 326 'intel': 'x86',
329 'arm': 'arm', 327 'arm': 'arm',
330 'mips': 'mips', 328 'mips': 'mips',
331 }.get(self.m.chromium.c.TARGET_ARCH, '') 329 }.get(self.m.chromium.c.TARGET_ARCH, '')
iannucci 2014/02/19 21:54:20 Same here... yay dups :(
332 330
333 def test_report(self): 331 def test_report(self):
334 return self.m.python.inline( 332 return self.m.python.inline(
335 'test_report', 333 'test_report',
336 """ 334 """
337 import glob, os, sys 335 import glob, os, sys
338 for report in glob.glob(sys.argv[1]): 336 for report in glob.glob(sys.argv[1]):
339 with open(report, 'r') as f: 337 with open(report, 'r') as f:
340 for l in f.readlines(): 338 for l in f.readlines():
341 print l 339 print l
(...skipping 19 matching lines...) Expand all
361 359
362 def common_tests_setup_steps(self): 360 def common_tests_setup_steps(self):
363 yield self.spawn_logcat_monitor() 361 yield self.spawn_logcat_monitor()
364 yield self.detect_and_setup_devices() 362 yield self.detect_and_setup_devices()
365 363
366 def common_tests_final_steps(self): 364 def common_tests_final_steps(self):
367 yield self.logcat_dump() 365 yield self.logcat_dump()
368 yield self.stack_tool_steps() 366 yield self.stack_tool_steps()
369 yield self.test_report() 367 yield self.test_report()
370 yield self.cleanup_build() 368 yield self.cleanup_build()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698