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

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

Issue 12387097: [Android] Run chromedriver tests on 'Android ChromeDriver Tests (dbg)' bot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | 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 json 8 import json
9 import multiprocessing 9 import multiprocessing
10 import optparse 10 import optparse
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 'chrome:chrome/test/data/android/device_files', 52 'chrome:chrome/test/data/android/device_files',
53 constants.CHROMIUM_TEST_SHELL_HOST_DRIVEN_DIR), 53 constants.CHROMIUM_TEST_SHELL_HOST_DRIVEN_DIR),
54 I_TEST('AndroidWebView', 54 I_TEST('AndroidWebView',
55 'AndroidWebView.apk', 55 'AndroidWebView.apk',
56 'org.chromium.android_webview', 56 'org.chromium.android_webview',
57 'AndroidWebViewTest', 57 'AndroidWebViewTest',
58 'webview:android_webview/test/data/device_files', 58 'webview:android_webview/test/data/device_files',
59 None), 59 None),
60 ]) 60 ])
61 61
62 VALID_TESTS = set(['ui', 'unit', 'webkit', 'webkit_layout']) 62 VALID_TESTS = set(['chromedriver', 'ui', 'unit', 'webkit', 'webkit_layout'])
63 63
64 64
65 65
66 def SpawnCmd(command): 66 def SpawnCmd(command):
67 """Spawn a process without waiting for termination.""" 67 """Spawn a process without waiting for termination."""
68 print '>', ' '.join(map(pipes.quote, command)) 68 print '>', ' '.join(map(pipes.quote, command))
69 sys.stdout.flush() 69 sys.stdout.flush()
70 if TESTING: 70 if TESTING:
71 class MockPopen(object): 71 class MockPopen(object):
72 @staticmethod 72 @staticmethod
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 suite in suites:
137 buildbot_report.PrintNamedStep(suite) 137 buildbot_report.PrintNamedStep(suite)
138 RunCmd(['build/android/run_tests.py', '-s', suite] + args) 138 RunCmd(['build/android/run_tests.py', '-s', suite] + args)
139 139
140 140
141 def RunChromeDriverTests():
142 """Run all the steps for running chromedriver tests.
Isaac (away) 2013/03/04 22:35:13 move triple code to line 142 (all on one line)
frankf 2013/03/04 23:18:11 Done.
143
144 """
145 buildbot_report.PrintNamedStep('chromedriver')
Isaac (away) 2013/03/04 22:35:13 would 'chromedriver_tests' be more descriptive?
frankf 2013/03/04 23:18:11 This is very close to the name of one of the steps
146 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py',
147 '--android-package=%s' % constants.CHROMIUM_TEST_SHELL_PACKAGE])
148
149
141 def InstallApk(options, test, print_step=False): 150 def InstallApk(options, test, print_step=False):
142 """Install an apk to all phones. 151 """Install an apk to all phones.
143 152
144 Args: 153 Args:
145 options: options object 154 options: options object
146 test: An I_TEST namedtuple 155 test: An I_TEST namedtuple
147 print_step: Print a buildbot step 156 print_step: Print a buildbot step
148 """ 157 """
149 if print_step: 158 if print_step:
150 buildbot_report.PrintNamedStep('install_%s' % test.name.lower()) 159 buildbot_report.PrintNamedStep('install_%s' % test.name.lower())
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 RebootDevices() 247 RebootDevices()
239 248
240 # Device check and alert emails 249 # Device check and alert emails
241 buildbot_report.PrintNamedStep('device_status_check') 250 buildbot_report.PrintNamedStep('device_status_check')
242 RunCmd(['build/android/device_status_check.py'], flunk_on_failure=False) 251 RunCmd(['build/android/device_status_check.py'], flunk_on_failure=False)
243 252
244 if options.install: 253 if options.install:
245 test_obj = INSTRUMENTATION_TESTS[options.install] 254 test_obj = INSTRUMENTATION_TESTS[options.install]
246 InstallApk(options, test_obj, print_step=True) 255 InstallApk(options, test_obj, print_step=True)
247 256
257 if 'chromedriver' in options.test_filter:
258 RunChromeDriverTests()
248 if 'unit' in options.test_filter: 259 if 'unit' in options.test_filter:
249 RunTestSuites(options, gtest_config.STABLE_TEST_SUITES) 260 RunTestSuites(options, gtest_config.STABLE_TEST_SUITES)
250 if 'ui' in options.test_filter: 261 if 'ui' in options.test_filter:
251 for test in INSTRUMENTATION_TESTS.itervalues(): 262 for test in INSTRUMENTATION_TESTS.itervalues():
252 RunInstrumentationSuite(options, test) 263 RunInstrumentationSuite(options, test)
253 if 'webkit' in options.test_filter: 264 if 'webkit' in options.test_filter:
254 RunTestSuites(options, ['webkit_unit_tests', 'TestWebKitAPI']) 265 RunTestSuites(options, ['webkit_unit_tests', 'TestWebKitAPI'])
255 RunWebkitLint(options.target) 266 RunWebkitLint(options.target)
256 if 'webkit_layout' in options.test_filter: 267 if 'webkit_layout' in options.test_filter:
257 RunWebkitLayoutTests(options) 268 RunWebkitLayoutTests(options)
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 'slave', 'android')) 335 'slave', 'android'))
325 if os.path.exists(build_internal_android): 336 if os.path.exists(build_internal_android):
326 android_paths.insert(0, build_internal_android) 337 android_paths.insert(0, build_internal_android)
327 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) 338 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']])
328 339
329 MainTestWrapper(options) 340 MainTestWrapper(options)
330 341
331 342
332 if __name__ == '__main__': 343 if __name__ == '__main__':
333 sys.exit(main(sys.argv)) 344 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/android/buildbot/bb_run_bot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698