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

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

Issue 2743033002: [android] Add support for providing flags to instrumentation tests directly. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « build/android/pylib/instrumentation/instrumentation_test_instance_test.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Runs all types of tests from one unified interface.""" 7 """Runs all types of tests from one unified interface."""
8 8
9 import argparse 9 import argparse
10 import collections 10 import collections
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 type=os.path.realpath, 359 type=os.path.realpath,
360 help='Path to install script for the --test-apk.') 360 help='Path to install script for the --test-apk.')
361 group.add_argument('--additional-apk', action='append', 361 group.add_argument('--additional-apk', action='append',
362 dest='additional_apks', default=[], 362 dest='additional_apks', default=[],
363 type=os.path.realpath, 363 type=os.path.realpath,
364 help='Additional apk that must be installed on ' 364 help='Additional apk that must be installed on '
365 'the device when the tests are run') 365 'the device when the tests are run')
366 group.add_argument('--coverage-dir', type=os.path.realpath, 366 group.add_argument('--coverage-dir', type=os.path.realpath,
367 help=('Directory in which to place all generated ' 367 help=('Directory in which to place all generated '
368 'EMMA coverage files.')) 368 'EMMA coverage files.'))
369 group.add_argument('--device-flags', dest='device_flags', 369 group.add_argument('--device-flags',
370 '--test-arguments',
mikecase (-- gone --) 2017/03/10 18:08:03 Why are we adding another alias for this? also, -
jbudorick 2017/03/10 18:11:17 --test-arguments is what it is for gtests, hence t
jam 2017/03/10 19:20:58 As a non-Android developer, having to specify comm
jbudorick 2017/03/10 19:38:44 hmm, we might be able to pass arguments that the t
371 dest='device_flags',
370 type=os.path.realpath, 372 type=os.path.realpath,
371 help='The relative filepath to a file containing ' 373 help='Command-line flags to set on the device')
shenghuazhang 2017/03/10 19:04:57 Since this is matching the argument in gtest, and
372 'command-line flags to set on the device')
373 group.add_argument('--device-flags-file', type=os.path.realpath, 374 group.add_argument('--device-flags-file', type=os.path.realpath,
374 help='The relative filepath to a file containing ' 375 help='The relative filepath to a file containing '
375 'command-line flags to set on the device') 376 'command-line flags to set on the device')
376 # TODO(jbudorick): Remove this after ensuring nothing else uses it. 377 # TODO(jbudorick): Remove this after ensuring nothing else uses it.
377 group.add_argument('--isolate_file_path', 378 group.add_argument('--isolate_file_path',
378 '--isolate-file-path', 379 '--isolate-file-path',
379 dest='isolate_file_path', 380 dest='isolate_file_path',
380 type=os.path.realpath, 381 type=os.path.realpath,
381 help=argparse.SUPPRESS) 382 help=argparse.SUPPRESS)
382 group.add_argument('--runtime-deps-path', 383 group.add_argument('--runtime-deps-path',
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 if e.is_infra_error: 854 if e.is_infra_error:
854 return constants.INFRA_EXIT_CODE 855 return constants.INFRA_EXIT_CODE
855 return constants.ERROR_EXIT_CODE 856 return constants.ERROR_EXIT_CODE
856 except: # pylint: disable=W0702 857 except: # pylint: disable=W0702
857 logging.exception('Unrecognized error occurred.') 858 logging.exception('Unrecognized error occurred.')
858 return constants.ERROR_EXIT_CODE 859 return constants.ERROR_EXIT_CODE
859 860
860 861
861 if __name__ == '__main__': 862 if __name__ == '__main__':
862 sys.exit(main()) 863 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/instrumentation/instrumentation_test_instance_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698