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

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

Issue 297833002: Add suite specific options argument to Android test bot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments, () -> [] Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 Returns: 90 Returns:
91 The revision number. 91 The revision number.
92 """ 92 """
93 revision = options.build_properties.get('got_revision') 93 revision = options.build_properties.get('got_revision')
94 if not revision: 94 if not revision:
95 revision = options.build_properties.get('revision', 'testing') 95 revision = options.build_properties.get('revision', 'testing')
96 return revision 96 return revision
97 97
98 98
99 def RunTestSuites(options, suites): 99 def RunTestSuites(options, suites, suites_options=None):
100 """Manages an invocation of test_runner.py for gtests. 100 """Manages an invocation of test_runner.py for gtests.
101 101
102 Args: 102 Args:
103 options: options object. 103 options: options object.
104 suites: List of suite names to run. 104 suites: List of suite names to run.
105 suites_options: Command line options dictionary for particular suites.
106 For example,
107 {'content_browsertests', ['--num_retries=1', '--release']}
108 will add the options only to content_browsertests.
105 """ 109 """
110
111 if not suites_options:
112 suites_options = {}
113
106 args = ['--verbose'] 114 args = ['--verbose']
107 if options.target == 'Release': 115 if options.target == 'Release':
108 args.append('--release') 116 args.append('--release')
109 if options.asan: 117 if options.asan:
110 args.append('--tool=asan') 118 args.append('--tool=asan')
111 if options.gtest_filter: 119 if options.gtest_filter:
112 args.append('--gtest-filter=%s' % options.gtest_filter) 120 args.append('--gtest-filter=%s' % options.gtest_filter)
121
113 for suite in suites: 122 for suite in suites:
114 bb_annotations.PrintNamedStep(suite) 123 bb_annotations.PrintNamedStep(suite)
115 cmd = ['build/android/test_runner.py', 'gtest', '-s', suite] + args 124 cmd = ['build/android/test_runner.py', 'gtest', '-s', suite] + args
125 cmd += suites_options.get(suite, [])
116 if suite == 'content_browsertests': 126 if suite == 'content_browsertests':
117 cmd.append('--num_retries=1') 127 cmd.append('--num_retries=1')
118 RunCmd(cmd) 128 RunCmd(cmd)
119 129
120 130
121 def RunChromeDriverTests(options): 131 def RunChromeDriverTests(options):
122 """Run all the steps for running chromedriver tests.""" 132 """Run all the steps for running chromedriver tests."""
123 bb_annotations.PrintNamedStep('chromedriver_annotation') 133 bb_annotations.PrintNamedStep('chromedriver_annotation')
124 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py', 134 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py',
125 '--android-packages=%s,%s,%s,%s' % 135 '--android-packages=%s,%s,%s,%s' %
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) 661 setattr(options, 'target', options.factory_properties.get('target', 'Debug'))
652 if options.coverage_bucket: 662 if options.coverage_bucket:
653 setattr(options, 'coverage_dir', 663 setattr(options, 'coverage_dir',
654 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) 664 os.path.join(CHROME_OUT_DIR, options.target, 'coverage'))
655 665
656 MainTestWrapper(options) 666 MainTestWrapper(options)
657 667
658 668
659 if __name__ == '__main__': 669 if __name__ == '__main__':
660 sys.exit(main(sys.argv)) 670 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698