| 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', 'telemetry_perf_unittests', |
| 81 'telemetry_unittests', 'ui', 'unit', 'webkit', |
| 81 'webkit_layout', 'webrtc_chromium', 'webrtc_native']) | 82 'webkit_layout', 'webrtc_chromium', '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. |
| (...skipping 66 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 RunTelemetryUnitTests(_): |
| 169 """Runs the telemetry 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 |
| 178 |
| 179 def RunTelemetryPerfUnitTests(_): |
| 180 """Runs the telemetry perf unit tests. |
| 181 |
| 182 Args: |
| 183 options: options object. |
| 184 """ |
| 185 args = ['--browser', 'android-chromium-testshell'] |
| 186 bb_annotations.PrintNamedStep('telemetry_perf_unittests') |
| 187 RunCmd(['tools/perf/run_tests'] + args) |
| 188 |
| 189 |
| 167 def InstallApk(options, test, print_step=False): | 190 def InstallApk(options, test, print_step=False): |
| 168 """Install an apk to all phones. | 191 """Install an apk to all phones. |
| 169 | 192 |
| 170 Args: | 193 Args: |
| 171 options: options object | 194 options: options object |
| 172 test: An I_TEST namedtuple | 195 test: An I_TEST namedtuple |
| 173 print_step: Print a buildbot step | 196 print_step: Print a buildbot step |
| 174 """ | 197 """ |
| 175 if print_step: | 198 if print_step: |
| 176 bb_annotations.PrintNamedStep('install_%s' % test.name.lower()) | 199 bb_annotations.PrintNamedStep('install_%s' % test.name.lower()) |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 bb_annotations.PrintNamedStep('webgl_conformance_tests') | 497 bb_annotations.PrintNamedStep('webgl_conformance_tests') |
| 475 RunCmd(['content/test/gpu/run_gpu_test.py', | 498 RunCmd(['content/test/gpu/run_gpu_test.py', |
| 476 '--browser=android-content-shell', 'webgl_conformance', | 499 '--browser=android-content-shell', 'webgl_conformance', |
| 477 '--webgl-conformance-version=1.0.1']) | 500 '--webgl-conformance-version=1.0.1']) |
| 478 | 501 |
| 479 | 502 |
| 480 def GetTestStepCmds(): | 503 def GetTestStepCmds(): |
| 481 return [ | 504 return [ |
| 482 ('chromedriver', RunChromeDriverTests), | 505 ('chromedriver', RunChromeDriverTests), |
| 483 ('gpu', RunGPUTests), | 506 ('gpu', RunGPUTests), |
| 507 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), |
| 508 ('telemetry_unittests', RunTelemetryUnitTests), |
| 484 ('unit', RunUnitTests), | 509 ('unit', RunUnitTests), |
| 485 ('ui', RunInstrumentationTests), | 510 ('ui', RunInstrumentationTests), |
| 486 ('webkit', RunWebkitTests), | 511 ('webkit', RunWebkitTests), |
| 487 ('webkit_layout', RunWebkitLayoutTests), | 512 ('webkit_layout', RunWebkitLayoutTests), |
| 488 ('webrtc_chromium', RunWebRTCChromiumTests), | 513 ('webrtc_chromium', RunWebRTCChromiumTests), |
| 489 ('webrtc_native', RunWebRTCNativeTests), | 514 ('webrtc_native', RunWebRTCNativeTests), |
| 490 ] | 515 ] |
| 491 | 516 |
| 492 | 517 |
| 493 def UploadHTML(options, gs_base_dir, dir_to_upload, link_text, | 518 def UploadHTML(options, gs_base_dir, dir_to_upload, link_text, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 671 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
| 647 if options.coverage_bucket: | 672 if options.coverage_bucket: |
| 648 setattr(options, 'coverage_dir', | 673 setattr(options, 'coverage_dir', |
| 649 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 674 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
| 650 | 675 |
| 651 MainTestWrapper(options) | 676 MainTestWrapper(options) |
| 652 | 677 |
| 653 | 678 |
| 654 if __name__ == '__main__': | 679 if __name__ == '__main__': |
| 655 sys.exit(main(sys.argv)) | 680 sys.exit(main(sys.argv)) |
| OLD | NEW |