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

Side by Side Diff: build/android/run_monkey_test.py

Issue 11616010: Refactor android test results logging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed all comments Created 8 years 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 | « build/android/run_instrumentation_tests.py ('k') | build/android/run_tests.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) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Runs the Monkey tests on one or more devices.""" 6 """Runs the Monkey tests on one or more devices."""
7 import logging 7 import logging
8 import optparse 8 import optparse
9 import random 9 import random
10 import sys 10 import sys
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if not attached_devices: 101 if not attached_devices:
102 raise Exception('You have no devices attached or visible!') 102 raise Exception('You have no devices attached or visible!')
103 103
104 # Actually run the tests. 104 # Actually run the tests.
105 logging.debug('Running monkey tests.') 105 logging.debug('Running monkey tests.')
106 available_tests *= len(attached_devices) 106 available_tests *= len(attached_devices)
107 options.ensure_value('shard_retries', 1) 107 options.ensure_value('shard_retries', 1)
108 sharder = python_test_sharder.PythonTestSharder( 108 sharder = python_test_sharder.PythonTestSharder(
109 attached_devices, available_tests, options) 109 attached_devices, available_tests, options)
110 result = sharder.RunShardedTests() 110 result = sharder.RunShardedTests()
111 result.LogFull('Monkey', 'Monkey', options.build_type, available_tests) 111 result.LogFull(
112 test_type='Monkey',
113 test_package='Monkey',
114 build_type=options.build_type)
112 result.PrintAnnotation() 115 result.PrintAnnotation()
113 116
114 117
115 def main(): 118 def main():
116 desc = 'Run the Monkey tests on 1 or more devices.' 119 desc = 'Run the Monkey tests on 1 or more devices.'
117 parser = optparse.OptionParser(description=desc) 120 parser = optparse.OptionParser(description=desc)
118 test_options_parser.AddBuildTypeOption(parser) 121 test_options_parser.AddBuildTypeOption(parser)
119 parser.add_option('--package-name', help='Allowed package.') 122 parser.add_option('--package-name', help='Allowed package.')
120 parser.add_option('--activity-name', 123 parser.add_option('--activity-name',
121 default='com.google.android.apps.chrome.Main', 124 default='com.google.android.apps.chrome.Main',
(...skipping 24 matching lines...) Expand all
146 parser.error('Missing package name') 149 parser.error('Missing package name')
147 150
148 if options.category: 151 if options.category:
149 options.category = options.category.split(',') 152 options.category = options.category.split(',')
150 153
151 DispatchPythonTests(options) 154 DispatchPythonTests(options)
152 155
153 156
154 if __name__ == '__main__': 157 if __name__ == '__main__':
155 main() 158 main()
OLDNEW
« no previous file with comments | « build/android/run_instrumentation_tests.py ('k') | build/android/run_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698