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 json | 8 import json |
9 import multiprocessing | 9 import multiprocessing |
10 import optparse | 10 import optparse |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 # Wait for logcat_monitor to pull existing logcat | 264 # Wait for logcat_monitor to pull existing logcat |
265 RunCmd(['sleep', '5']) | 265 RunCmd(['sleep', '5']) |
266 | 266 |
267 if options.reboot: | 267 if options.reboot: |
268 RebootDevices() | 268 RebootDevices() |
269 | 269 |
270 # Device check and alert emails | 270 # Device check and alert emails |
271 buildbot_report.PrintNamedStep('device_status_check') | 271 buildbot_report.PrintNamedStep('device_status_check') |
272 RunCmd(['build/android/device_status_check.py']) | 272 RunCmd(['build/android/device_status_check.py']) |
273 | 273 |
| 274 # Provision devices |
| 275 if options.experimental: |
| 276 buildbot_report.PrintNamedStep('provision_devices') |
| 277 target = options.factory_properties.get('target', 'Debug') |
| 278 adb_reboot = CHROME_SRC + ('/out/%s/adb_reboot' % target) |
| 279 RunCmd(['build/android/provision_devices.py', '-a', adb_reboot]) |
| 280 |
274 if options.install: | 281 if options.install: |
275 test_obj = INSTRUMENTATION_TESTS[options.install] | 282 test_obj = INSTRUMENTATION_TESTS[options.install] |
276 InstallApk(options, test_obj, print_step=True) | 283 InstallApk(options, test_obj, print_step=True) |
277 | 284 |
278 if 'chromedriver' in options.test_filter: | 285 if 'chromedriver' in options.test_filter: |
279 RunChromeDriverTests() | 286 RunChromeDriverTests() |
280 if 'unit' in options.test_filter: | 287 if 'unit' in options.test_filter: |
281 RunTestSuites(options, gtest_config.STABLE_TEST_SUITES) | 288 RunTestSuites(options, gtest_config.STABLE_TEST_SUITES) |
282 if 'ui' in options.test_filter: | 289 if 'ui' in options.test_filter: |
283 for test in INSTRUMENTATION_TESTS.itervalues(): | 290 for test in INSTRUMENTATION_TESTS.itervalues(): |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 'slave', 'android')) | 367 'slave', 'android')) |
361 if os.path.exists(build_internal_android): | 368 if os.path.exists(build_internal_android): |
362 android_paths.insert(0, build_internal_android) | 369 android_paths.insert(0, build_internal_android) |
363 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) | 370 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) |
364 | 371 |
365 MainTestWrapper(options) | 372 MainTestWrapper(options) |
366 | 373 |
367 | 374 |
368 if __name__ == '__main__': | 375 if __name__ == '__main__': |
369 sys.exit(main(sys.argv)) | 376 sys.exit(main(sys.argv)) |
OLD | NEW |