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

Side by Side Diff: build/android/pylib/utils/test_options_parser.py

Issue 11666023: Move android buildbot test logic into python (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | « build/android/pylib/instrumentation/apk_info.py ('k') | 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Parses options for the instrumentation tests.""" 5 """Parses options for the instrumentation tests."""
6 6
7 #TODO(craigdh): pylib/utils/ should not depend on pylib/. 7 #TODO(craigdh): pylib/utils/ should not depend on pylib/.
8 from pylib import constants 8 from pylib import constants
9 9
10 import optparse 10 import optparse
(...skipping 25 matching lines...) Expand all
36 ' application (with the .apk extension).')) 36 ' application (with the .apk extension).'))
37 option_parser.add_option('--apk_package', 37 option_parser.add_option('--apk_package',
38 help=('The package name used by the apk containing ' 38 help=('The package name used by the apk containing '
39 'the application.')) 39 'the application.'))
40 40
41 41
42 def ValidateInstallAPKOption(option_parser, options): 42 def ValidateInstallAPKOption(option_parser, options):
43 if not options.apk: 43 if not options.apk:
44 option_parser.error('--apk is mandatory.') 44 option_parser.error('--apk is mandatory.')
45 if not os.path.exists(options.apk): 45 if not os.path.exists(options.apk):
46 options.apk = os.path.join(os.environ['CHROME_SRC'], 46 options.apk = os.path.join(constants.CHROME_DIR,
47 'out', options.build_type, 47 'out', options.build_type,
48 'apks', options.apk) 48 'apks', options.apk)
49 49
50 50
51 def AddTestRunnerOptions(option_parser, default_timeout=60): 51 def AddTestRunnerOptions(option_parser, default_timeout=60):
52 """Decorates OptionParser with options applicable to all tests.""" 52 """Decorates OptionParser with options applicable to all tests."""
53 53
54 option_parser.add_option('-t', dest='timeout', 54 option_parser.add_option('-t', dest='timeout',
55 help='Timeout to wait for each test', 55 help='Timeout to wait for each test',
56 type='int', 56 type='int',
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 '%s.apk' % options.test_apk) 230 '%s.apk' % options.test_apk)
231 options.test_apk_jar_path = os.path.join( 231 options.test_apk_jar_path = os.path.join(
232 _SDK_OUT_DIR, options.build_type, constants.SDK_BUILD_TEST_JAVALIB_DIR, 232 _SDK_OUT_DIR, options.build_type, constants.SDK_BUILD_TEST_JAVALIB_DIR,
233 '%s.jar' % options.test_apk) 233 '%s.jar' % options.test_apk)
234 if options.annotation_str: 234 if options.annotation_str:
235 options.annotation = options.annotation_str.split() 235 options.annotation = options.annotation_str.split()
236 elif options.test_filter: 236 elif options.test_filter:
237 options.annotation = [] 237 options.annotation = []
238 else: 238 else:
239 options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] 239 options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest']
OLDNEW
« no previous file with comments | « build/android/pylib/instrumentation/apk_info.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698