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

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

Issue 2536373005: Add --test-jar arg to test_runner to explicitly specify its path. (Closed)
Patch Set: Added required=True Created 4 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
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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 # TODO(jbudorick): Remove support for name-style APK specification once 339 # TODO(jbudorick): Remove support for name-style APK specification once
340 # bots are no longer doing it. 340 # bots are no longer doing it.
341 group.add_argument('--apk-under-test', 341 group.add_argument('--apk-under-test',
342 help='Path or name of the apk under test.') 342 help='Path or name of the apk under test.')
343 group.add_argument('--apk-under-test-incremental-install-script', 343 group.add_argument('--apk-under-test-incremental-install-script',
344 help='Path to install script for the --apk-under-test.') 344 help='Path to install script for the --apk-under-test.')
345 group.add_argument('--test-apk', required=True, 345 group.add_argument('--test-apk', required=True,
346 help='Path or name of the apk containing the tests ' 346 help='Path or name of the apk containing the tests '
347 '(name is without the .apk extension; ' 347 '(name is without the .apk extension; '
348 'e.g. "ContentShellTest").') 348 'e.g. "ContentShellTest").')
349 group.add_argument('--test-jar', required=True,
350 help='Path of jar containing test java files.')
349 group.add_argument('--test-apk-incremental-install-script', 351 group.add_argument('--test-apk-incremental-install-script',
350 type=os.path.realpath, 352 type=os.path.realpath,
351 help='Path to install script for the --test-apk.') 353 help='Path to install script for the --test-apk.')
352 group.add_argument('--additional-apk', action='append', 354 group.add_argument('--additional-apk', action='append',
353 dest='additional_apks', default=[], 355 dest='additional_apks', default=[],
354 type=os.path.realpath, 356 type=os.path.realpath,
355 help='Additional apk that must be installed on ' 357 help='Additional apk that must be installed on '
356 'the device when the tests are run') 358 'the device when the tests are run')
357 group.add_argument('--coverage-dir', type=os.path.realpath, 359 group.add_argument('--coverage-dir', type=os.path.realpath,
358 help=('Directory in which to place all generated ' 360 help=('Directory in which to place all generated '
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 if e.is_infra_error: 859 if e.is_infra_error:
858 return constants.INFRA_EXIT_CODE 860 return constants.INFRA_EXIT_CODE
859 return constants.ERROR_EXIT_CODE 861 return constants.ERROR_EXIT_CODE
860 except: # pylint: disable=W0702 862 except: # pylint: disable=W0702
861 logging.exception('Unrecognized error occurred.') 863 logging.exception('Unrecognized error occurred.')
862 return constants.ERROR_EXIT_CODE 864 return constants.ERROR_EXIT_CODE
863 865
864 866
865 if __name__ == '__main__': 867 if __name__ == '__main__':
866 sys.exit(main()) 868 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/instrumentation/instrumentation_test_instance.py ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698