OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import collections | 6 import collections |
7 import glob | 7 import glob |
8 import hashlib | 8 import hashlib |
9 import multiprocessing | 9 import multiprocessing |
10 import os | 10 import os |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 '--builder-name', builder_name, | 278 '--builder-name', builder_name, |
279 '--gs-bucket', gs_bucket]) | 279 '--gs-bucket', gs_bucket]) |
280 | 280 |
281 | 281 |
282 def EscapeBuilderName(builder_name): | 282 def EscapeBuilderName(builder_name): |
283 return re.sub('[ ()]', '_', builder_name) | 283 return re.sub('[ ()]', '_', builder_name) |
284 | 284 |
285 | 285 |
286 def SpawnLogcatMonitor(): | 286 def SpawnLogcatMonitor(): |
287 shutil.rmtree(LOGCAT_DIR, ignore_errors=True) | 287 shutil.rmtree(LOGCAT_DIR, ignore_errors=True) |
288 bb_utils.RunCmd([ | 288 bb_utils.SpawnCmd([ |
289 os.path.join(CHROME_SRC_DIR, 'build', 'android', 'adb_logcat_monitor.py'), | 289 os.path.join(CHROME_SRC_DIR, 'build', 'android', 'adb_logcat_monitor.py'), |
290 LOGCAT_DIR]) | 290 LOGCAT_DIR]) |
291 | 291 |
292 # Wait for logcat_monitor to pull existing logcat | 292 # Wait for logcat_monitor to pull existing logcat |
293 RunCmd(['sleep', '5']) | 293 RunCmd(['sleep', '5']) |
294 | 294 |
295 def ProvisionDevices(options): | 295 def ProvisionDevices(options): |
296 bb_annotations.PrintNamedStep('provision_devices') | 296 bb_annotations.PrintNamedStep('provision_devices') |
297 | 297 |
298 if not bb_utils.TESTING: | 298 if not bb_utils.TESTING: |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 491 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
492 if options.coverage_bucket: | 492 if options.coverage_bucket: |
493 setattr(options, 'coverage_dir', | 493 setattr(options, 'coverage_dir', |
494 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 494 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
495 | 495 |
496 MainTestWrapper(options) | 496 MainTestWrapper(options) |
497 | 497 |
498 | 498 |
499 if __name__ == '__main__': | 499 if __name__ == '__main__': |
500 sys.exit(main(sys.argv)) | 500 sys.exit(main(sys.argv)) |
OLD | NEW |