Chromium Code Reviews

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

Issue 1917243002: Revert "build: roll infra_paths changes" (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 import contextlib 5 import contextlib
6 import datetime 6 import datetime
7 import json 7 import json
8 import os 8 import os
9 import re 9 import re
10 import urllib 10 import urllib
(...skipping 101 matching lines...)
112 refs = [refs] 112 refs = [refs]
113 if use_bot_update: 113 if use_bot_update:
114 result = self.m.bot_update.ensure_checkout( 114 result = self.m.bot_update.ensure_checkout(
115 spec, refs=refs, with_branch_heads=with_branch_heads, force=True) 115 spec, refs=refs, with_branch_heads=with_branch_heads, force=True)
116 else: 116 else:
117 result = self.m.gclient.checkout(spec, with_branch_heads=with_branch_heads ) 117 result = self.m.gclient.checkout(spec, with_branch_heads=with_branch_heads )
118 118
119 # TODO(sivachandra): Manufacture gclient spec such that it contains "src" 119 # TODO(sivachandra): Manufacture gclient spec such that it contains "src"
120 # solution + repo_name solution. Then checkout will be automatically 120 # solution + repo_name solution. Then checkout will be automatically
121 # correctly set by gclient.checkout 121 # correctly set by gclient.checkout
122 self.m.path['checkout'] = self.m.infra_paths['slave_build'].join('src') 122 self.m.path['checkout'] = self.m.path['slave_build'].join('src')
123 123
124 self.clean_local_files() 124 self.clean_local_files()
125 125
126 return result 126 return result
127 127
128 def clean_local_files(self): 128 def clean_local_files(self):
129 target = self.c.BUILD_CONFIG 129 target = self.c.BUILD_CONFIG
130 debug_info_dumps = self.m.path['checkout'].join('out', 130 debug_info_dumps = self.m.path['checkout'].join('out',
131 target, 131 target,
132 'debug_info_dumps') 132 'debug_info_dumps')
(...skipping 30 matching lines...)
163 # TODO(sivachandra): Disable subannottations after cleaning up 163 # TODO(sivachandra): Disable subannottations after cleaning up
164 # tree_truth.sh. 164 # tree_truth.sh.
165 self.m.step('tree truth steps', 165 self.m.step('tree truth steps',
166 [self.m.path['checkout'].join('build', 'tree_truth.sh'), 166 [self.m.path['checkout'].join('build', 'tree_truth.sh'),
167 self.m.path['checkout']] + repos, 167 self.m.path['checkout']] + repos,
168 allow_subannotations=False) 168 allow_subannotations=False)
169 169
170 def git_number(self, **kwargs): 170 def git_number(self, **kwargs):
171 return self.m.step( 171 return self.m.step(
172 'git_number', 172 'git_number',
173 [self.m.infra_paths['depot_tools'].join('git_number.py')], 173 [self.m.path['depot_tools'].join('git_number.py')],
174 stdout = self.m.raw_io.output(), 174 stdout = self.m.raw_io.output(),
175 step_test_data=( 175 step_test_data=(
176 lambda: 176 lambda:
177 self.m.raw_io.test_api.stream_output('3000\n') 177 self.m.raw_io.test_api.stream_output('3000\n')
178 ), 178 ),
179 cwd=self.m.path['checkout'], 179 cwd=self.m.path['checkout'],
180 infra_step=True, 180 infra_step=True,
181 **kwargs) 181 **kwargs)
182 182
183 def java_method_count(self, dexfile, name='java_method_count'): 183 def java_method_count(self, dexfile, name='java_method_count'):
(...skipping 70 matching lines...)
254 254
255 def zip_and_upload_build(self, bucket): 255 def zip_and_upload_build(self, bucket):
256 # TODO(luqui): Unify make_zip_archive and upload_build with this 256 # TODO(luqui): Unify make_zip_archive and upload_build with this
257 # (or at least make the difference clear). 257 # (or at least make the difference clear).
258 self.m.archive.zip_and_upload_build( 258 self.m.archive.zip_and_upload_build(
259 'zip_build', 259 'zip_build',
260 target=self.m.chromium.c.BUILD_CONFIG, 260 target=self.m.chromium.c.BUILD_CONFIG,
261 # We send None as the path so that zip_build.py gets it from factory 261 # We send None as the path so that zip_build.py gets it from factory
262 # properties. 262 # properties.
263 build_url=None, 263 build_url=None,
264 src_dir=self.m.infra_paths['slave_build'].join('src'), 264 src_dir=self.m.path['slave_build'].join('src'),
265 exclude_files='lib.target,gen,android_webview,jingle_unittests') 265 exclude_files='lib.target,gen,android_webview,jingle_unittests')
266 266
267 def create_adb_symlink(self): 267 def create_adb_symlink(self):
268 # Creates a sym link to the adb executable in the home dir 268 # Creates a sym link to the adb executable in the home dir
269 self.m.python( 269 self.m.python(
270 'create adb symlink', 270 'create adb symlink',
271 self.m.path['checkout'].join('build', 'symlink.py'), 271 self.m.path['checkout'].join('build', 'symlink.py'),
272 ['-f', self.m.adb.adb_path(), os.path.join('~', 'adb')], 272 ['-f', self.m.adb.adb_path(), os.path.join('~', 'adb')],
273 infra_step=True) 273 infra_step=True)
274 274
(...skipping 45 matching lines...)
320 skip_wipe=skip_wipe, disable_location=disable_location, 320 skip_wipe=skip_wipe, disable_location=disable_location,
321 min_battery_level=min_battery_level, disable_network=disable_network, 321 min_battery_level=min_battery_level, disable_network=disable_network,
322 disable_java_debug=disable_java_debug, reboot_timeout=reboot_timeout, 322 disable_java_debug=disable_java_debug, reboot_timeout=reboot_timeout,
323 max_battery_temp=max_battery_temp) 323 max_battery_temp=max_battery_temp)
324 324
325 @property 325 @property
326 def blacklist_file(self): 326 def blacklist_file(self):
327 return self.out_path.join('bad_devices.json') 327 return self.out_path.join('bad_devices.json')
328 328
329 def device_status_check(self, restart_usb=False, **kwargs): 329 def device_status_check(self, restart_usb=False, **kwargs):
330 # TODO(phajdan.jr): Remove infra_paths['build'] usage, http://crbug.com/4372 64 . 330 # TODO(phajdan.jr): Remove path['build'] usage, http://crbug.com/437264 .
331 devices_path = self.m.infra_paths['build'].join('site_config', '.known_devic es') 331 devices_path = self.m.path['build'].join('site_config', '.known_devices')
332 args = [ 332 args = [
333 '--json-output', self.m.json.output(), 333 '--json-output', self.m.json.output(),
334 '--blacklist-file', self.blacklist_file, 334 '--blacklist-file', self.blacklist_file,
335 '--known-devices-file', devices_path, 335 '--known-devices-file', devices_path,
336 ] 336 ]
337 if restart_usb: 337 if restart_usb:
338 args += ['--restart-usb'] 338 args += ['--restart-usb']
339 339
340 try: 340 try:
341 result = self.m.step( 341 result = self.m.step(
(...skipping 544 matching lines...)
886 self.logcat_dump(gs_bucket=logcat_gs_bucket) 886 self.logcat_dump(gs_bucket=logcat_gs_bucket)
887 self.stack_tool_steps() 887 self.stack_tool_steps()
888 if self.c.gce_setup: 888 if self.c.gce_setup:
889 self.shutdown_gce_instances(count=self.c.gce_count) 889 self.shutdown_gce_instances(count=self.c.gce_count)
890 self.test_report() 890 self.test_report()
891 891
892 def run_bisect_script(self, extra_src='', path_to_config='', **kwargs): 892 def run_bisect_script(self, extra_src='', path_to_config='', **kwargs):
893 self.m.step('prepare bisect perf regression', 893 self.m.step('prepare bisect perf regression',
894 [self.m.path['checkout'].join('tools', 894 [self.m.path['checkout'].join('tools',
895 'prepare-bisect-perf-regression.py'), 895 'prepare-bisect-perf-regression.py'),
896 '-w', self.m.infra_paths['slave_build']]) 896 '-w', self.m.path['slave_build']])
897 897
898 args = [] 898 args = []
899 if extra_src: 899 if extra_src:
900 args = args + ['--extra_src', extra_src] 900 args = args + ['--extra_src', extra_src]
901 if path_to_config: 901 if path_to_config:
902 args = args + ['--path_to_config', path_to_config] 902 args = args + ['--path_to_config', path_to_config]
903 self.m.step('run bisect perf regression', 903 self.m.step('run bisect perf regression',
904 [self.m.path['checkout'].join('tools', 904 [self.m.path['checkout'].join('tools',
905 'run-bisect-perf-regression.py'), 905 'run-bisect-perf-regression.py'),
906 '-w', self.m.infra_paths['slave_build']] + args, **kwargs) 906 '-w', self.m.path['slave_build']] + args, **kwargs)
907 907
908 def run_test_suite(self, suite, verbose=True, isolate_file_path=None, 908 def run_test_suite(self, suite, verbose=True, isolate_file_path=None,
909 gtest_filter=None, tool=None, flakiness_dashboard=None, 909 gtest_filter=None, tool=None, flakiness_dashboard=None,
910 name=None, json_results_file=None, shard_timeout=None, 910 name=None, json_results_file=None, shard_timeout=None,
911 args=None, **kwargs): 911 args=None, **kwargs):
912 args = args or [] 912 args = args or []
913 args.extend(['--blacklist-file', self.blacklist_file]) 913 args.extend(['--blacklist-file', self.blacklist_file])
914 if verbose: 914 if verbose:
915 args.append('--verbose') 915 args.append('--verbose')
916 # TODO(agrieve): Remove once no more tests pass isolate_file_path (contained 916 # TODO(agrieve): Remove once no more tests pass isolate_file_path (contained
(...skipping 343 matching lines...)
1260 script = self.c.test_runner 1260 script = self.c.test_runner
1261 if wrapper_script_suite_name: 1261 if wrapper_script_suite_name:
1262 script = self.m.chromium.output_dir.join('bin', 'run_%s' % 1262 script = self.m.chromium.output_dir.join('bin', 'run_%s' %
1263 wrapper_script_suite_name) 1263 wrapper_script_suite_name)
1264 else: 1264 else:
1265 env = kwargs.get('env', {}) 1265 env = kwargs.get('env', {})
1266 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', 1266 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR',
1267 self.m.chromium.output_dir) 1267 self.m.chromium.output_dir)
1268 kwargs['env'] = env 1268 kwargs['env'] = env
1269 return self.m.python(step_name, script, args, **kwargs) 1269 return self.m.python(step_name, script, args, **kwargs)
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/chromium_android/__init__.py ('k') | scripts/slave/recipe_modules/chromium_android/example.py » ('j') | no next file with comments »

Powered by Google App Engine