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 multiprocessing | 10 import multiprocessing |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 'ChromeShellTest', | 70 'ChromeShellTest', |
71 'chrome:chrome/test/data/android/device_files', | 71 'chrome:chrome/test/data/android/device_files', |
72 constants.CHROME_SHELL_HOST_DRIVEN_DIR), | 72 constants.CHROME_SHELL_HOST_DRIVEN_DIR), |
73 I('AndroidWebView', | 73 I('AndroidWebView', |
74 'AndroidWebView.apk', | 74 'AndroidWebView.apk', |
75 'org.chromium.android_webview.shell', | 75 'org.chromium.android_webview.shell', |
76 'AndroidWebViewTest', | 76 'AndroidWebViewTest', |
77 'webview:android_webview/test/data/device_files'), | 77 'webview:android_webview/test/data/device_files'), |
78 ]) | 78 ]) |
79 | 79 |
80 VALID_TESTS = set(['chromedriver', 'gpu', 'ui', 'unit', 'webkit', | 80 VALID_TESTS = set(['chromedriver', 'gpu', 'ui', 'unit', 'telemetry_tests', |
tonyg
2014/04/12 01:37:29
Looks like these were alphabetical. Should we main
navabi
2014/04/12 01:55:01
Yes we should. Will fix. And I realized I should s
| |
81 'webkit_layout', 'webrtc_chromium', 'webrtc_native']) | 81 'webkit', 'webkit_layout', 'webrtc_chromium', |
82 'webrtc_native']) | |
82 | 83 |
83 RunCmd = bb_utils.RunCmd | 84 RunCmd = bb_utils.RunCmd |
84 | 85 |
85 | 86 |
86 def _GetRevision(options): | 87 def _GetRevision(options): |
87 """Get the SVN revision number. | 88 """Get the SVN revision number. |
88 | 89 |
89 Args: | 90 Args: |
90 options: options object. | 91 options: options object. |
91 | 92 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py', | 158 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py', |
158 '--android-packages=%s,%s,%s,%s' % | 159 '--android-packages=%s,%s,%s,%s' % |
159 ('chrome_shell', | 160 ('chrome_shell', |
160 'chrome_stable', | 161 'chrome_stable', |
161 'chrome_beta', | 162 'chrome_beta', |
162 'chromedriver_webview_shell'), | 163 'chromedriver_webview_shell'), |
163 '--revision=%s' % _GetRevision(options), | 164 '--revision=%s' % _GetRevision(options), |
164 '--update-log']) | 165 '--update-log']) |
165 | 166 |
166 | 167 |
168 def RunTelemetryTests(_): | |
169 """Runs the telemetry unit tests and perf unit tests. | |
170 | |
171 Args: | |
172 options: options object. | |
173 """ | |
174 args = ['--browser', 'android-chromium-testshell'] | |
175 bb_annotations.PrintNamedStep('telemetry_unittests') | |
176 RunCmd(['tools/telemetry/run_tests'] + args) | |
177 bb_annotations.PrintNamedStep('telemetry_perf_unittests') | |
178 RunCmd(['tools/perf/run_tests'] + args) | |
179 | |
180 | |
167 def InstallApk(options, test, print_step=False): | 181 def InstallApk(options, test, print_step=False): |
168 """Install an apk to all phones. | 182 """Install an apk to all phones. |
169 | 183 |
170 Args: | 184 Args: |
171 options: options object | 185 options: options object |
172 test: An I_TEST namedtuple | 186 test: An I_TEST namedtuple |
173 print_step: Print a buildbot step | 187 print_step: Print a buildbot step |
174 """ | 188 """ |
175 if print_step: | 189 if print_step: |
176 bb_annotations.PrintNamedStep('install_%s' % test.name.lower()) | 190 bb_annotations.PrintNamedStep('install_%s' % test.name.lower()) |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
476 '--browser=android-content-shell', 'webgl_conformance', | 490 '--browser=android-content-shell', 'webgl_conformance', |
477 '--webgl-conformance-version=1.0.1']) | 491 '--webgl-conformance-version=1.0.1']) |
478 | 492 |
479 | 493 |
480 def GetTestStepCmds(): | 494 def GetTestStepCmds(): |
481 return [ | 495 return [ |
482 ('chromedriver', RunChromeDriverTests), | 496 ('chromedriver', RunChromeDriverTests), |
483 ('gpu', RunGPUTests), | 497 ('gpu', RunGPUTests), |
484 ('unit', RunUnitTests), | 498 ('unit', RunUnitTests), |
485 ('ui', RunInstrumentationTests), | 499 ('ui', RunInstrumentationTests), |
500 ('telemetry_tests', RunTelemetryTests), | |
tonyg
2014/04/12 01:37:29
ditto
| |
486 ('webkit', RunWebkitTests), | 501 ('webkit', RunWebkitTests), |
487 ('webkit_layout', RunWebkitLayoutTests), | 502 ('webkit_layout', RunWebkitLayoutTests), |
488 ('webrtc_chromium', RunWebRTCChromiumTests), | 503 ('webrtc_chromium', RunWebRTCChromiumTests), |
489 ('webrtc_native', RunWebRTCNativeTests), | 504 ('webrtc_native', RunWebRTCNativeTests), |
490 ] | 505 ] |
491 | 506 |
492 | 507 |
493 def UploadHTML(options, gs_base_dir, dir_to_upload, link_text, | 508 def UploadHTML(options, gs_base_dir, dir_to_upload, link_text, |
494 link_rel_path='index.html', gs_url=GS_URL): | 509 link_rel_path='index.html', gs_url=GS_URL): |
495 """Uploads directory at |dir_to_upload| to Google Storage and output a link. | 510 """Uploads directory at |dir_to_upload| to Google Storage and output a link. |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
646 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 661 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
647 if options.coverage_bucket: | 662 if options.coverage_bucket: |
648 setattr(options, 'coverage_dir', | 663 setattr(options, 'coverage_dir', |
649 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 664 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
650 | 665 |
651 MainTestWrapper(options) | 666 MainTestWrapper(options) |
652 | 667 |
653 | 668 |
654 if __name__ == '__main__': | 669 if __name__ == '__main__': |
655 sys.exit(main(sys.argv)) | 670 sys.exit(main(sys.argv)) |
OLD | NEW |