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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 'ChromeShellTest', | 67 'ChromeShellTest', |
68 'chrome:chrome/test/data/android/device_files', | 68 'chrome:chrome/test/data/android/device_files', |
69 constants.CHROME_SHELL_HOST_DRIVEN_DIR), | 69 constants.CHROME_SHELL_HOST_DRIVEN_DIR), |
70 I('AndroidWebView', | 70 I('AndroidWebView', |
71 'AndroidWebView.apk', | 71 'AndroidWebView.apk', |
72 'org.chromium.android_webview.shell', | 72 'org.chromium.android_webview.shell', |
73 'AndroidWebViewTest', | 73 'AndroidWebViewTest', |
74 'webview:android_webview/test/data/device_files'), | 74 'webview:android_webview/test/data/device_files'), |
75 ]) | 75 ]) |
76 | 76 |
77 VALID_TESTS = set(['chromedriver', 'gpu', 'mojo', 'telemetry_perf_unittests', | 77 VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', 'mojo', |
78 'ui', 'unit', 'webkit', 'webkit_layout', 'webrtc_chromium', | 78 'telemetry_perf_unittests', 'ui', 'unit', 'webkit', |
79 'webrtc_native']) | 79 'webkit_layout', 'webrtc_chromium', 'webrtc_native']) |
80 | 80 |
81 RunCmd = bb_utils.RunCmd | 81 RunCmd = bb_utils.RunCmd |
82 | 82 |
83 | 83 |
84 def _GetRevision(options): | 84 def _GetRevision(options): |
85 """Get the SVN revision number. | 85 """Get the SVN revision number. |
86 | 86 |
87 Args: | 87 Args: |
88 options: options object. | 88 options: options object. |
89 | 89 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 bb_annotations.PrintNamedStep('chromedriver_annotation') | 133 bb_annotations.PrintNamedStep('chromedriver_annotation') |
134 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py', | 134 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py', |
135 '--android-packages=%s,%s,%s,%s' % | 135 '--android-packages=%s,%s,%s,%s' % |
136 ('chrome_shell', | 136 ('chrome_shell', |
137 'chrome_stable', | 137 'chrome_stable', |
138 'chrome_beta', | 138 'chrome_beta', |
139 'chromedriver_webview_shell'), | 139 'chromedriver_webview_shell'), |
140 '--revision=%s' % _GetRevision(options), | 140 '--revision=%s' % _GetRevision(options), |
141 '--update-log']) | 141 '--update-log']) |
142 | 142 |
| 143 def RunChromeProxyTests(options): |
| 144 """Run the chrome_proxy tests. |
| 145 |
| 146 Args: |
| 147 options: options object. |
| 148 """ |
| 149 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) |
| 150 args = ['--browser', 'android-chrome-shell'] |
| 151 devices = android_commands.GetAttachedDevices() |
| 152 if devices: |
| 153 args = args + ['--device', devices[0]] |
| 154 bb_annotations.PrintNamedStep('chrome_proxy') |
| 155 RunCmd(['tools/chrome_proxy/run_tests'] + args) |
143 | 156 |
144 def RunTelemetryPerfUnitTests(options): | 157 def RunTelemetryPerfUnitTests(options): |
145 """Runs the telemetry perf unit tests. | 158 """Runs the telemetry perf unit tests. |
146 | 159 |
147 Args: | 160 Args: |
148 options: options object. | 161 options: options object. |
149 """ | 162 """ |
150 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) | 163 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) |
151 args = ['--browser', 'android-chrome-shell'] | 164 args = ['--browser', 'android-chrome-shell'] |
152 devices = android_commands.GetAttachedDevices() | 165 devices = android_commands.GetAttachedDevices() |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 'android-content-shell', | 502 'android-content-shell', |
490 '--build-revision', | 503 '--build-revision', |
491 str(revision), | 504 str(revision), |
492 '--test-machine-name', | 505 '--test-machine-name', |
493 EscapeBuilderName(builder_name)]) | 506 EscapeBuilderName(builder_name)]) |
494 | 507 |
495 | 508 |
496 def GetTestStepCmds(): | 509 def GetTestStepCmds(): |
497 return [ | 510 return [ |
498 ('chromedriver', RunChromeDriverTests), | 511 ('chromedriver', RunChromeDriverTests), |
| 512 ('chrome_proxy', RunChromeProxyTests), |
499 ('gpu', RunGPUTests), | 513 ('gpu', RunGPUTests), |
500 ('mojo', RunMojoTests), | 514 ('mojo', RunMojoTests), |
501 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), | 515 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), |
502 ('unit', RunUnitTests), | 516 ('unit', RunUnitTests), |
503 ('ui', RunInstrumentationTests), | 517 ('ui', RunInstrumentationTests), |
504 ('webkit', RunWebkitTests), | 518 ('webkit', RunWebkitTests), |
505 ('webkit_layout', RunWebkitLayoutTests), | 519 ('webkit_layout', RunWebkitLayoutTests), |
506 ('webrtc_chromium', RunWebRTCChromiumTests), | 520 ('webrtc_chromium', RunWebRTCChromiumTests), |
507 ('webrtc_native', RunWebRTCNativeTests), | 521 ('webrtc_native', RunWebRTCNativeTests), |
508 ] | 522 ] |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 | 703 |
690 if options.coverage_bucket: | 704 if options.coverage_bucket: |
691 setattr(options, 'coverage_dir', | 705 setattr(options, 'coverage_dir', |
692 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 706 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
693 | 707 |
694 MainTestWrapper(options) | 708 MainTestWrapper(options) |
695 | 709 |
696 | 710 |
697 if __name__ == '__main__': | 711 if __name__ == '__main__': |
698 sys.exit(main(sys.argv)) | 712 sys.exit(main(sys.argv)) |
OLD | NEW |