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

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

Issue 12758002: Add android buildbot support for exe tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add envsetup to all tests. Created 7 years, 9 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 | Annotate | Revision Log
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 json 8 import json
9 import multiprocessing 9 import multiprocessing
10 import optparse 10 import optparse
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 for device, result in zip(devices, results): 114 for device, result in zip(devices, results):
115 if result: 115 if result:
116 print '%s failed to startup.' % device 116 print '%s failed to startup.' % device
117 117
118 if any(results): 118 if any(results):
119 buildbot_report.PrintWarning() 119 buildbot_report.PrintWarning()
120 else: 120 else:
121 print 'Reboots complete.' 121 print 'Reboots complete.'
122 122
123 123
124 def RunTestSuites(options, suites): 124 def RunTestSuites(options, all_suites):
125 """Manages an invocation of run_tests.py. 125 """Manages an invocation of run_tests.py.
126 126
127 Args: 127 Args:
128 options: options object. 128 options: options object.
129 suites: List of suites to run. 129 suites: List of suites to run.
130 """ 130 """
131 args = ['--verbose'] 131 args = ['--verbose']
132 if options.target == 'Release': 132 if options.target == 'Release':
133 args.append('--release') 133 args.append('--release')
134 if options.asan: 134 if options.asan:
135 args.append('--tool=asan') 135 args.append('--tool=asan')
136 for suite in suites: 136 for is_exe_suite, suites in all_suites.iteritems():
137 buildbot_report.PrintNamedStep(suite) 137 for suite in suites:
138 RunCmd(['build/android/run_tests.py', '-s', suite] + args) 138 buildbot_report.PrintNamedStep(suite)
139 cmd = ['build/android/run_tests.py', '-s', suite] + args
140 if is_exe_suite:
141 cmd.append('--exe')
142 RunCmd(cmd)
139 143
140 def RunBrowserTestSuite(options): 144 def RunBrowserTestSuite(options):
141 """Manages an invocation of run_browser_tests.py. 145 """Manages an invocation of run_browser_tests.py.
142 146
143 Args: 147 Args:
144 options: options object. 148 options: options object.
145 """ 149 """
146 args = ['--verbose'] 150 args = ['--verbose']
147 if options.target == 'Release': 151 if options.target == 'Release':
148 args.append('--release') 152 args.append('--release')
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 InstallApk(options, test_obj, print_step=True) 270 InstallApk(options, test_obj, print_step=True)
267 271
268 if 'chromedriver' in options.test_filter: 272 if 'chromedriver' in options.test_filter:
269 RunChromeDriverTests() 273 RunChromeDriverTests()
270 if 'unit' in options.test_filter: 274 if 'unit' in options.test_filter:
271 RunTestSuites(options, gtest_config.STABLE_TEST_SUITES) 275 RunTestSuites(options, gtest_config.STABLE_TEST_SUITES)
272 if 'ui' in options.test_filter: 276 if 'ui' in options.test_filter:
273 for test in INSTRUMENTATION_TESTS.itervalues(): 277 for test in INSTRUMENTATION_TESTS.itervalues():
274 RunInstrumentationSuite(options, test) 278 RunInstrumentationSuite(options, test)
275 if 'webkit' in options.test_filter: 279 if 'webkit' in options.test_filter:
276 RunTestSuites(options, ['webkit_unit_tests', 'TestWebKitAPI']) 280 RunTestSuites(options, {False: ['webkit_unit_tests', 'TestWebKitAPI']})
277 RunWebkitLint(options.target) 281 RunWebkitLint(options.target)
278 if 'webkit_layout' in options.test_filter: 282 if 'webkit_layout' in options.test_filter:
279 RunWebkitLayoutTests(options) 283 RunWebkitLayoutTests(options)
280 284
281 if options.experimental: 285 if options.experimental:
282 RunTestSuites(options, gtest_config.EXPERIMENTAL_TEST_SUITES) 286 RunTestSuites(options, gtest_config.EXPERIMENTAL_TEST_SUITES)
283 RunBrowserTestSuite(options) 287 RunBrowserTestSuite(options)
284 288
285 # Print logcat, kill logcat monitor 289 # Print logcat, kill logcat monitor
286 buildbot_report.PrintNamedStep('logcat_dump') 290 buildbot_report.PrintNamedStep('logcat_dump')
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 'slave', 'android')) 351 'slave', 'android'))
348 if os.path.exists(build_internal_android): 352 if os.path.exists(build_internal_android):
349 android_paths.insert(0, build_internal_android) 353 android_paths.insert(0, build_internal_android)
350 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) 354 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']])
351 355
352 MainTestWrapper(options) 356 MainTestWrapper(options)
353 357
354 358
355 if __name__ == '__main__': 359 if __name__ == '__main__':
356 sys.exit(main(sys.argv)) 360 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/android/buildbot/bb_run_bot.py » ('j') | build/android/pylib/gtest/gtest_config.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698