| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 'ChromiumTestShellTest', | 59 'ChromiumTestShellTest', |
| 60 'chrome:chrome/test/data/android/device_files', | 60 'chrome:chrome/test/data/android/device_files', |
| 61 constants.CHROMIUM_TEST_SHELL_HOST_DRIVEN_DIR), | 61 constants.CHROMIUM_TEST_SHELL_HOST_DRIVEN_DIR), |
| 62 I('AndroidWebView', | 62 I('AndroidWebView', |
| 63 'AndroidWebView.apk', | 63 'AndroidWebView.apk', |
| 64 'org.chromium.android_webview.shell', | 64 'org.chromium.android_webview.shell', |
| 65 'AndroidWebViewTest', | 65 'AndroidWebViewTest', |
| 66 'webview:android_webview/test/data/device_files'), | 66 'webview:android_webview/test/data/device_files'), |
| 67 ]) | 67 ]) |
| 68 | 68 |
| 69 VALID_TESTS = set(['chromedriver', 'ui', 'unit', 'webkit', 'webkit_layout', | 69 VALID_TESTS = set(['chromedriver', 'gpu', 'ui', 'unit', 'webkit', |
| 70 'webrtc']) | 70 'webkit_layout', 'webrtc']) |
| 71 | 71 |
| 72 RunCmd = bb_utils.RunCmd | 72 RunCmd = bb_utils.RunCmd |
| 73 | 73 |
| 74 | 74 |
| 75 # multiprocessing map_async requires a top-level function for pickle library. | 75 # multiprocessing map_async requires a top-level function for pickle library. |
| 76 def RebootDeviceSafe(device): | 76 def RebootDeviceSafe(device): |
| 77 """Reboot a device, wait for it to start, and squelch timeout exceptions.""" | 77 """Reboot a device, wait for it to start, and squelch timeout exceptions.""" |
| 78 try: | 78 try: |
| 79 android_commands.AndroidCommands(device).Reboot(True) | 79 android_commands.AndroidCommands(device).Reboot(True) |
| 80 except errors.DeviceUnresponsiveError as e: | 80 except errors.DeviceUnresponsiveError as e: |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 def RunWebkitTests(options): | 297 def RunWebkitTests(options): |
| 298 RunTestSuites(options, ['webkit_unit_tests']) | 298 RunTestSuites(options, ['webkit_unit_tests']) |
| 299 RunWebkitLint(options.target) | 299 RunWebkitLint(options.target) |
| 300 | 300 |
| 301 | 301 |
| 302 def RunWebRTCTests(options): | 302 def RunWebRTCTests(options): |
| 303 RunTestSuites(options, gtest_config.WEBRTC_TEST_SUITES) | 303 RunTestSuites(options, gtest_config.WEBRTC_TEST_SUITES) |
| 304 | 304 |
| 305 | 305 |
| 306 def RunGPUTests(_): |
| 307 bb_annotations.PrintNamedStep('gpu_tests') |
| 308 RunCmd(['content/test/gpu/run_gpu_test', |
| 309 '--browser=android-content-shell', 'pixel']) |
| 310 |
| 311 |
| 306 def GetTestStepCmds(): | 312 def GetTestStepCmds(): |
| 307 return [ | 313 return [ |
| 308 ('chromedriver', RunChromeDriverTests), | 314 ('chromedriver', RunChromeDriverTests), |
| 315 ('gpu', RunGPUTests), |
| 309 ('unit', RunUnitTests), | 316 ('unit', RunUnitTests), |
| 310 ('ui', RunInstrumentationTests), | 317 ('ui', RunInstrumentationTests), |
| 311 ('webkit', RunWebkitTests), | 318 ('webkit', RunWebkitTests), |
| 312 ('webkit_layout', RunWebkitLayoutTests), | 319 ('webkit_layout', RunWebkitLayoutTests), |
| 313 ('webrtc', RunWebRTCTests), | 320 ('webrtc', RunWebRTCTests), |
| 314 ] | 321 ] |
| 315 | 322 |
| 316 | 323 |
| 317 def UploadCoverageData(options, path, coverage_type): | 324 def UploadCoverageData(options, path, coverage_type): |
| 318 """Uploads directory at |path| to Google Storage. | 325 """Uploads directory at |path| to Google Storage. |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 457 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
| 451 if options.coverage_bucket: | 458 if options.coverage_bucket: |
| 452 setattr(options, 'coverage_dir', | 459 setattr(options, 'coverage_dir', |
| 453 os.path.join(CHROME_SRC, 'out', options.target, 'coverage')) | 460 os.path.join(CHROME_SRC, 'out', options.target, 'coverage')) |
| 454 | 461 |
| 455 MainTestWrapper(options) | 462 MainTestWrapper(options) |
| 456 | 463 |
| 457 | 464 |
| 458 if __name__ == '__main__': | 465 if __name__ == '__main__': |
| 459 sys.exit(main(sys.argv)) | 466 sys.exit(main(sys.argv)) |
| OLD | NEW |