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

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

Issue 12207171: [Android] Add a dummy host-driven test for ChromiumTestShell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/pylib/constants.py » ('j') | build/android/pylib/constants.py » ('J')
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 18 matching lines...) Expand all
29 29
30 CHROME_SRC = constants.CHROME_DIR 30 CHROME_SRC = constants.CHROME_DIR
31 31
32 # Describes an instrumation test suite: 32 # Describes an instrumation test suite:
33 # test: Name of test we're running. 33 # test: Name of test we're running.
34 # apk: apk to be installed. 34 # apk: apk to be installed.
35 # apk_package: package for the apk to be installed. 35 # apk_package: package for the apk to be installed.
36 # test_apk: apk to run tests on. 36 # test_apk: apk to run tests on.
37 # test_data: data folder in format destination:source. 37 # test_data: data folder in format destination:source.
38 I_TEST = collections.namedtuple('InstrumentationTest', [ 38 I_TEST = collections.namedtuple('InstrumentationTest', [
39 'name', 'apk', 'apk_package', 'test_apk', 'test_data']) 39 'name', 'apk', 'apk_package', 'test_apk', 'test_data', 'host_driven_root'])
40 40
41 INSTRUMENTATION_TESTS = dict((suite.name, suite) for suite in [ 41 INSTRUMENTATION_TESTS = dict((suite.name, suite) for suite in [
42 I_TEST('ContentShell', 42 I_TEST('ContentShell',
43 'ContentShell.apk', 43 'ContentShell.apk',
44 'org.chromium.content_shell_apk', 44 'org.chromium.content_shell_apk',
45 'ContentShellTest', 45 'ContentShellTest',
46 'content:content/test/data/android/device_files'), 46 'content:content/test/data/android/device_files',
47 None),
47 I_TEST('ChromiumTestShell', 48 I_TEST('ChromiumTestShell',
48 'ChromiumTestShell.apk', 49 'ChromiumTestShell.apk',
49 'org.chromium.chrome.testshell', 50 'org.chromium.chrome.testshell',
50 'ChromiumTestShellTest', 51 'ChromiumTestShellTest',
51 'chrome:chrome/test/data/android/device_files'), 52 'chrome:chrome/test/data/android/device_files',
53 constants.CHROMIUM_TEST_SHELL_HOST_DRIVEN_DIR),
52 I_TEST('AndroidWebView', 54 I_TEST('AndroidWebView',
53 'AndroidWebView.apk', 55 'AndroidWebView.apk',
54 'org.chromium.android_webview', 56 'org.chromium.android_webview',
55 'AndroidWebViewTest', 57 'AndroidWebViewTest',
56 'webview:android_webview/test/data/device_files'), 58 'webview:android_webview/test/data/device_files',
59 None),
57 ]) 60 ])
58 61
59 VALID_TESTS = set(['ui', 'unit', 'webkit', 'webkit_layout']) 62 VALID_TESTS = set(['ui', 'unit', 'webkit', 'webkit_layout'])
60 63
61 64
62 65
63 def SpawnCmd(command): 66 def SpawnCmd(command):
64 """Spawn a process without waiting for termination.""" 67 """Spawn a process without waiting for termination."""
65 print '>', ' '.join(map(pipes.quote, command)) 68 print '>', ' '.join(map(pipes.quote, command))
66 sys.stdout.flush() 69 sys.stdout.flush()
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 InstallApk(options, test) 167 InstallApk(options, test)
165 args = ['--test-apk', test.test_apk, '--test_data', test.test_data, '-vvv', 168 args = ['--test-apk', test.test_apk, '--test_data', test.test_data, '-vvv',
166 '-I'] 169 '-I']
167 if options.target == 'Release': 170 if options.target == 'Release':
168 args.append('--release') 171 args.append('--release')
169 if options.asan: 172 if options.asan:
170 args.append('--tool=asan') 173 args.append('--tool=asan')
171 if options.upload_to_flakiness_server: 174 if options.upload_to_flakiness_server:
172 args.append('--flakiness-dashboard-server=%s' % 175 args.append('--flakiness-dashboard-server=%s' %
173 constants.UPSTREAM_FLAKINESS_SERVER) 176 constants.UPSTREAM_FLAKINESS_SERVER)
177 if test.host_driven_root:
178 args.append('--python_test_root=%s' % test.host_driven_root)
174 179
175 RunCmd(['build/android/run_instrumentation_tests.py'] + args) 180 RunCmd(['build/android/run_instrumentation_tests.py'] + args)
176 181
177 182
178 def RunWebkitLint(target): 183 def RunWebkitLint(target):
179 """Lint WebKit's TestExpectation files.""" 184 """Lint WebKit's TestExpectation files."""
180 buildbot_report.PrintNamedStep('webkit_lint') 185 buildbot_report.PrintNamedStep('webkit_lint')
181 RunCmd(['webkit/tools/layout_tests/run_webkit_tests.py', 186 RunCmd(['webkit/tools/layout_tests/run_webkit_tests.py',
182 '--lint-test-files', 187 '--lint-test-files',
183 '--chromium', 188 '--chromium',
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 'slave', 'android')) 324 'slave', 'android'))
320 if os.path.exists(build_internal_android): 325 if os.path.exists(build_internal_android):
321 android_paths.insert(0, build_internal_android) 326 android_paths.insert(0, build_internal_android)
322 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) 327 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']])
323 328
324 MainTestWrapper(options) 329 MainTestWrapper(options)
325 330
326 331
327 if __name__ == '__main__': 332 if __name__ == '__main__':
328 sys.exit(main(sys.argv)) 333 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/constants.py » ('j') | build/android/pylib/constants.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698