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

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

Issue 1108173002: Roll //build, //native_client, and a few more targets of opportunity. Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Test fix Created 5 years, 8 months 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
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 InstallablePackage = collections.namedtuple('InstallablePackage', [ 87 InstallablePackage = collections.namedtuple('InstallablePackage', [
88 'name', 'apk', 'apk_package']) 88 'name', 'apk', 'apk_package'])
89 89
90 INSTALLABLE_PACKAGES = dict((package.name, package) for package in ( 90 INSTALLABLE_PACKAGES = dict((package.name, package) for package in (
91 [InstallablePackage(i.name, i.apk, i.apk_package) 91 [InstallablePackage(i.name, i.apk, i.apk_package)
92 for i in INSTRUMENTATION_TESTS.itervalues()] + 92 for i in INSTRUMENTATION_TESTS.itervalues()] +
93 [InstallablePackage('ChromeDriverWebViewShell', 93 [InstallablePackage('ChromeDriverWebViewShell',
94 'ChromeDriverWebViewShell.apk', 94 'ChromeDriverWebViewShell.apk',
95 'org.chromium.chromedriver_webview_shell')])) 95 'org.chromium.chromedriver_webview_shell')]))
96 96
97 VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', 97 VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'components_browsertests',
98 'telemetry_unittests', 'telemetry_perf_unittests', 'ui', 98 'gpu', 'python_unittests', 'telemetry_unittests',
99 'unit', 'webkit', 'webkit_layout', 'python_unittests']) 99 'telemetry_perf_unittests', 'ui', 'unit', 'webkit',
100 'webkit_layout'])
100 101
101 RunCmd = bb_utils.RunCmd 102 RunCmd = bb_utils.RunCmd
102 103
103 104
104 def _GetRevision(options): 105 def _GetRevision(options):
105 """Get the SVN revision number. 106 """Get the SVN revision number.
106 107
107 Args: 108 Args:
108 options: options object. 109 options: options object.
109 110
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 args.append('--release') 166 args.append('--release')
166 if options.asan: 167 if options.asan:
167 args.append('--tool=asan') 168 args.append('--tool=asan')
168 if options.gtest_filter: 169 if options.gtest_filter:
169 args.append('--gtest-filter=%s' % options.gtest_filter) 170 args.append('--gtest-filter=%s' % options.gtest_filter)
170 171
171 for suite in suites: 172 for suite in suites:
172 bb_annotations.PrintNamedStep(suite) 173 bb_annotations.PrintNamedStep(suite)
173 cmd = [suite] + args 174 cmd = [suite] + args
174 cmd += suites_options.get(suite, []) 175 cmd += suites_options.get(suite, [])
175 if suite == 'content_browsertests': 176 if suite == 'content_browsertests' or suite == 'components_browsertests':
176 cmd.append('--num_retries=1') 177 cmd.append('--num_retries=1')
177 _RunTest(options, cmd, suite) 178 _RunTest(options, cmd, suite)
178 179
179 180
180 def RunChromeDriverTests(options): 181 def RunChromeDriverTests(options):
181 """Run all the steps for running chromedriver tests.""" 182 """Run all the steps for running chromedriver tests."""
182 bb_annotations.PrintNamedStep('chromedriver_annotation') 183 bb_annotations.PrintNamedStep('chromedriver_annotation')
183 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py', 184 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py',
184 '--android-packages=%s,%s,%s,%s' % 185 '--android-packages=%s,%s,%s,%s' %
185 ('chrome_shell', 186 ('chrome_shell',
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 '--exit-after-n-crashes-or-timeouts', '100', 309 '--exit-after-n-crashes-or-timeouts', '100',
309 '--debug-rwt-logging', 310 '--debug-rwt-logging',
310 '--results-directory', '../layout-test-results', 311 '--results-directory', '../layout-test-results',
311 '--target', options.target, 312 '--target', options.target,
312 '--builder-name', options.build_properties.get('buildername', ''), 313 '--builder-name', options.build_properties.get('buildername', ''),
313 '--build-number', str(options.build_properties.get('buildnumber', '')), 314 '--build-number', str(options.build_properties.get('buildnumber', '')),
314 '--master-name', 'ChromiumWebkit', # TODO: Get this from the cfg. 315 '--master-name', 'ChromiumWebkit', # TODO: Get this from the cfg.
315 '--build-name', options.build_properties.get('buildername', ''), 316 '--build-name', options.build_properties.get('buildername', ''),
316 '--platform=android'] 317 '--platform=android']
317 318
318 for flag in 'test_results_server', 'driver_name', 'additional_drt_flag': 319 for flag in 'test_results_server', 'driver_name', 'additional_driver_flag':
319 if flag in options.factory_properties: 320 if flag in options.factory_properties:
320 cmd_args.extend(['--%s' % flag.replace('_', '-'), 321 cmd_args.extend(['--%s' % flag.replace('_', '-'),
321 options.factory_properties.get(flag)]) 322 options.factory_properties.get(flag)])
322 323
323 for f in options.factory_properties.get('additional_expectations', []): 324 for f in options.factory_properties.get('additional_expectations', []):
324 cmd_args.extend( 325 cmd_args.extend(
325 ['--additional-expectations=%s' % os.path.join(CHROME_SRC_DIR, *f)]) 326 ['--additional-expectations=%s' % os.path.join(CHROME_SRC_DIR, *f)])
326 327
327 # TODO(dpranke): Remove this block after 328 # TODO(dpranke): Remove this block after
328 # https://codereview.chromium.org/12927002/ lands. 329 # https://codereview.chromium.org/12927002/ lands.
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 def RunPythonUnitTests(_options): 551 def RunPythonUnitTests(_options):
551 for suite in constants.PYTHON_UNIT_TEST_SUITES: 552 for suite in constants.PYTHON_UNIT_TEST_SUITES:
552 bb_annotations.PrintNamedStep(suite) 553 bb_annotations.PrintNamedStep(suite)
553 RunCmd(['build/android/test_runner.py', 'python', '-s', suite]) 554 RunCmd(['build/android/test_runner.py', 'python', '-s', suite])
554 555
555 556
556 def GetTestStepCmds(): 557 def GetTestStepCmds():
557 return [ 558 return [
558 ('chromedriver', RunChromeDriverTests), 559 ('chromedriver', RunChromeDriverTests),
559 ('chrome_proxy', RunChromeProxyTests), 560 ('chrome_proxy', RunChromeProxyTests),
561 ('components_browsertests',
562 lambda options: RunTestSuites(options, ['components_browsertests'])),
560 ('gpu', RunGPUTests), 563 ('gpu', RunGPUTests),
561 ('python_unittests', RunPythonUnitTests), 564 ('python_unittests', RunPythonUnitTests),
562 ('telemetry_unittests', RunTelemetryUnitTests), 565 ('telemetry_unittests', RunTelemetryUnitTests),
563 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), 566 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests),
564 ('ui', RunInstrumentationTests), 567 ('ui', RunInstrumentationTests),
565 ('unit', RunUnitTests), 568 ('unit', RunUnitTests),
566 ('webkit', RunWebkitTests), 569 ('webkit', RunWebkitTests),
567 ('webkit_layout', RunWebkitLayoutTests), 570 ('webkit_layout', RunWebkitLayoutTests),
568 ] 571 ]
569 572
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 760
758 if options.coverage_bucket: 761 if options.coverage_bucket:
759 setattr(options, 'coverage_dir', 762 setattr(options, 'coverage_dir',
760 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) 763 os.path.join(CHROME_OUT_DIR, options.target, 'coverage'))
761 764
762 MainTestWrapper(options) 765 MainTestWrapper(options)
763 766
764 767
765 if __name__ == '__main__': 768 if __name__ == '__main__':
766 sys.exit(main(sys.argv)) 769 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/buildbot/bb_device_status_check.py ('k') | build/android/buildbot/bb_host_steps.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698