Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Side by Side Diff: build/android/buildbot/bb_device_steps.py

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/win/win_util_unittest.cc ('k') | build/android/buildbot/bb_run_bot.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ]) 76 ])
77 77
78 VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', 'mojo', 'sync', 78 VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', 'sync',
79 'telemetry_perf_unittests', 'ui', 'unit', 'webkit', 79 'telemetry_perf_unittests', 'ui', 'unit', 'webkit',
80 'webkit_layout']) 80 'webkit_layout', 'python_unittests'])
81 81
82 RunCmd = bb_utils.RunCmd 82 RunCmd = bb_utils.RunCmd
83 83
84 84
85 def _GetRevision(options): 85 def _GetRevision(options):
86 """Get the SVN revision number. 86 """Get the SVN revision number.
87 87
88 Args: 88 Args:
89 options: options object. 89 options: options object.
90 90
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 """ 201 """
202 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) 202 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False)
203 args = ['--browser', 'android-chrome-shell'] 203 args = ['--browser', 'android-chrome-shell']
204 devices = android_commands.GetAttachedDevices() 204 devices = android_commands.GetAttachedDevices()
205 if devices: 205 if devices:
206 args = args + ['--device', devices[0]] 206 args = args + ['--device', devices[0]]
207 bb_annotations.PrintNamedStep('telemetry_perf_unittests') 207 bb_annotations.PrintNamedStep('telemetry_perf_unittests')
208 RunCmd(['tools/perf/run_tests'] + args) 208 RunCmd(['tools/perf/run_tests'] + args)
209 209
210 210
211 def RunMojoTests(options):
212 """Runs the mojo unit tests.
213
214 Args:
215 options: options object.
216 """
217 test = I('MojoTest',
218 None,
219 'org.chromium.mojo.tests',
220 'MojoTest',
221 'bindings:mojo/public/interfaces/bindings/tests/data')
222 RunInstrumentationSuite(options, test)
223
224
225 def InstallApk(options, test, print_step=False): 211 def InstallApk(options, test, print_step=False):
226 """Install an apk to all phones. 212 """Install an apk to all phones.
227 213
228 Args: 214 Args:
229 options: options object 215 options: options object
230 test: An I_TEST namedtuple 216 test: An I_TEST namedtuple
231 print_step: Print a buildbot step 217 print_step: Print a buildbot step
232 """ 218 """
233 if print_step: 219 if print_step:
234 bb_annotations.PrintNamedStep('install_%s' % test.name.lower()) 220 bb_annotations.PrintNamedStep('install_%s' % test.name.lower())
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 RunCmd(['content/test/gpu/run_gpu_test.py', 513 RunCmd(['content/test/gpu/run_gpu_test.py',
528 'gpu_rasterization', 514 'gpu_rasterization',
529 '--browser', 515 '--browser',
530 'android-content-shell', 516 'android-content-shell',
531 '--build-revision', 517 '--build-revision',
532 str(revision), 518 str(revision),
533 '--test-machine-name', 519 '--test-machine-name',
534 EscapeBuilderName(builder_name)]) 520 EscapeBuilderName(builder_name)])
535 521
536 522
523 def RunPythonUnitTests(_options):
524 for suite in constants.PYTHON_UNIT_TEST_SUITES:
525 bb_annotations.PrintNamedStep(suite)
526 RunCmd(['build/android/test_runner.py', 'python', '-s', suite])
527
528
537 def GetTestStepCmds(): 529 def GetTestStepCmds():
538 return [ 530 return [
539 ('chromedriver', RunChromeDriverTests), 531 ('chromedriver', RunChromeDriverTests),
540 ('chrome_proxy', RunChromeProxyTests), 532 ('chrome_proxy', RunChromeProxyTests),
541 ('gpu', RunGPUTests), 533 ('gpu', RunGPUTests),
542 ('mojo', RunMojoTests), 534 ('python_unittests', RunPythonUnitTests),
543 ('sync', RunChromeSyncShellTests), 535 ('sync', RunChromeSyncShellTests),
544 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), 536 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests),
545 ('ui', RunInstrumentationTests), 537 ('ui', RunInstrumentationTests),
546 ('unit', RunUnitTests), 538 ('unit', RunUnitTests),
547 ('webkit', RunWebkitTests), 539 ('webkit', RunWebkitTests),
548 ('webkit_layout', RunWebkitLayoutTests), 540 ('webkit_layout', RunWebkitLayoutTests),
549 ] 541 ]
550 542
551 543
552 def MakeGSPath(options, gs_base_dir): 544 def MakeGSPath(options, gs_base_dir):
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 727
736 if options.coverage_bucket: 728 if options.coverage_bucket:
737 setattr(options, 'coverage_dir', 729 setattr(options, 'coverage_dir',
738 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) 730 os.path.join(CHROME_OUT_DIR, options.target, 'coverage'))
739 731
740 MainTestWrapper(options) 732 MainTestWrapper(options)
741 733
742 734
743 if __name__ == '__main__': 735 if __name__ == '__main__':
744 sys.exit(main(sys.argv)) 736 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « base/win/win_util_unittest.cc ('k') | build/android/buildbot/bb_run_bot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698