Chromium Code Reviews| 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 json | 9 import json |
| 10 import os | 10 import os |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 'ChromeShell.apk', | 66 'ChromeShell.apk', |
| 67 'org.chromium.chrome.shell', | 67 'org.chromium.chrome.shell', |
| 68 'ChromeShellTest', | 68 'ChromeShellTest', |
| 69 'chrome:chrome/test/data/android/device_files', | 69 'chrome:chrome/test/data/android/device_files', |
| 70 constants.CHROME_SHELL_HOST_DRIVEN_DIR), | 70 constants.CHROME_SHELL_HOST_DRIVEN_DIR), |
| 71 I('AndroidWebView', | 71 I('AndroidWebView', |
| 72 'AndroidWebView.apk', | 72 'AndroidWebView.apk', |
| 73 'org.chromium.android_webview.shell', | 73 'org.chromium.android_webview.shell', |
| 74 'AndroidWebViewTest', | 74 'AndroidWebViewTest', |
| 75 'webview:android_webview/test/data/device_files'), | 75 'webview:android_webview/test/data/device_files'), |
| 76 I('ChromeSyncShell', | |
| 77 'ChromeSyncShell.apk', | |
| 78 'org.chromium.chrome.browser.sync', | |
| 79 'ChromeSyncShellTest', | |
| 80 None), | |
|
jbudorick
2014/10/27 18:14:09
Why didn't the device_files folder make the jump?
mikecase (-- gone --)
2014/10/27 18:21:39
I tested it locally and the ChromeSyncTest doesn't
| |
| 76 ]) | 81 ]) |
| 77 | 82 |
| 78 VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', 'sync', | 83 VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', |
| 79 'telemetry_perf_unittests', 'ui', 'unit', 'webkit', | 84 'telemetry_perf_unittests', 'ui', 'unit', 'webkit', |
| 80 'webkit_layout', 'python_unittests']) | 85 'webkit_layout', 'python_unittests']) |
| 81 | 86 |
| 82 RunCmd = bb_utils.RunCmd | 87 RunCmd = bb_utils.RunCmd |
| 83 | 88 |
| 84 | 89 |
| 85 def _GetRevision(options): | 90 def _GetRevision(options): |
| 86 """Get the SVN revision number. | 91 """Get the SVN revision number. |
| 87 | 92 |
| 88 Args: | 93 Args: |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 options: options object. | 182 options: options object. |
| 178 """ | 183 """ |
| 179 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) | 184 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) |
| 180 args = ['--browser', 'android-chrome-shell'] | 185 args = ['--browser', 'android-chrome-shell'] |
| 181 devices = android_commands.GetAttachedDevices() | 186 devices = android_commands.GetAttachedDevices() |
| 182 if devices: | 187 if devices: |
| 183 args = args + ['--device', devices[0]] | 188 args = args + ['--device', devices[0]] |
| 184 bb_annotations.PrintNamedStep('chrome_proxy') | 189 bb_annotations.PrintNamedStep('chrome_proxy') |
| 185 RunCmd(['tools/chrome_proxy/run_tests'] + args) | 190 RunCmd(['tools/chrome_proxy/run_tests'] + args) |
| 186 | 191 |
| 187 def RunChromeSyncShellTests(options): | |
| 188 """Run the chrome sync shell tests""" | |
| 189 test = I('ChromeSyncShell', | |
| 190 'ChromeSyncShell.apk', | |
| 191 'org.chromium.chrome.browser.sync', | |
| 192 'ChromeSyncShellTest', | |
| 193 'chrome:chrome/test/data/android/device_files') | |
| 194 RunInstrumentationSuite(options, test) | |
| 195 | 192 |
| 196 def RunTelemetryPerfUnitTests(options): | 193 def RunTelemetryPerfUnitTests(options): |
| 197 """Runs the telemetry perf unit tests. | 194 """Runs the telemetry perf unit tests. |
| 198 | 195 |
| 199 Args: | 196 Args: |
| 200 options: options object. | 197 options: options object. |
| 201 """ | 198 """ |
| 202 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) | 199 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) |
| 203 args = ['--browser', 'android-chrome-shell'] | 200 args = ['--browser', 'android-chrome-shell'] |
| 204 devices = android_commands.GetAttachedDevices() | 201 devices = android_commands.GetAttachedDevices() |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 525 bb_annotations.PrintNamedStep(suite) | 522 bb_annotations.PrintNamedStep(suite) |
| 526 RunCmd(['build/android/test_runner.py', 'python', '-s', suite]) | 523 RunCmd(['build/android/test_runner.py', 'python', '-s', suite]) |
| 527 | 524 |
| 528 | 525 |
| 529 def GetTestStepCmds(): | 526 def GetTestStepCmds(): |
| 530 return [ | 527 return [ |
| 531 ('chromedriver', RunChromeDriverTests), | 528 ('chromedriver', RunChromeDriverTests), |
| 532 ('chrome_proxy', RunChromeProxyTests), | 529 ('chrome_proxy', RunChromeProxyTests), |
| 533 ('gpu', RunGPUTests), | 530 ('gpu', RunGPUTests), |
| 534 ('python_unittests', RunPythonUnitTests), | 531 ('python_unittests', RunPythonUnitTests), |
| 535 ('sync', RunChromeSyncShellTests), | |
| 536 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), | 532 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), |
| 537 ('ui', RunInstrumentationTests), | 533 ('ui', RunInstrumentationTests), |
| 538 ('unit', RunUnitTests), | 534 ('unit', RunUnitTests), |
| 539 ('webkit', RunWebkitTests), | 535 ('webkit', RunWebkitTests), |
| 540 ('webkit_layout', RunWebkitLayoutTests), | 536 ('webkit_layout', RunWebkitLayoutTests), |
| 541 ] | 537 ] |
| 542 | 538 |
| 543 | 539 |
| 544 def MakeGSPath(options, gs_base_dir): | 540 def MakeGSPath(options, gs_base_dir): |
| 545 revision = _GetRevision(options) | 541 revision = _GetRevision(options) |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 727 | 723 |
| 728 if options.coverage_bucket: | 724 if options.coverage_bucket: |
| 729 setattr(options, 'coverage_dir', | 725 setattr(options, 'coverage_dir', |
| 730 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 726 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
| 731 | 727 |
| 732 MainTestWrapper(options) | 728 MainTestWrapper(options) |
| 733 | 729 |
| 734 | 730 |
| 735 if __name__ == '__main__': | 731 if __name__ == '__main__': |
| 736 sys.exit(main(sys.argv)) | 732 sys.exit(main(sys.argv)) |
| OLD | NEW |