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

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

Issue 2767613002: Expose resources in Robolectric/JUnit tests. (Closed)
Patch Set: rebase! Created 3 years, 8 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
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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 help='Filters tests by runner class. Must be fully qualified.') 462 help='Filters tests by runner class. Must be fully qualified.')
463 parser.add_argument( 463 parser.add_argument(
464 '-f', '--test-filter', 464 '-f', '--test-filter',
465 dest='test_filter', 465 dest='test_filter',
466 help='Filters tests googletest-style.') 466 help='Filters tests googletest-style.')
467 parser.add_argument( 467 parser.add_argument(
468 '-s', '--test-suite', 468 '-s', '--test-suite',
469 dest='test_suite', required=True, 469 dest='test_suite', required=True,
470 help='JUnit test suite to run.') 470 help='JUnit test suite to run.')
471 471
472 # These arguments are for Android Robolectric tests.
473 parser.add_argument(
474 '--android-manifest-path',
475 help='Path to Android Manifest to configure Robolectric.')
476 parser.add_argument(
477 '--package-name',
478 help='Default app package name for Robolectric tests.')
479 parser.add_argument(
480 '--resource-zip',
481 action='append', dest='resource_zips', default=[],
482 help='Path to resource zips to configure Robolectric.')
483 parser.add_argument(
484 '--robolectric-runtime-deps-dir',
485 help='Path to runtime deps for Robolectric.')
486
472 487
473 def AddLinkerTestOptions(parser): 488 def AddLinkerTestOptions(parser):
474 489
475 parser.add_argument_group('linker arguments') 490 parser.add_argument_group('linker arguments')
476 491
477 parser.add_argument( 492 parser.add_argument(
478 '-f', '--gtest-filter', 493 '-f', '--gtest-filter',
479 dest='test_filter', 494 dest='test_filter',
480 help='googletest-style filter string.') 495 help='googletest-style filter string.')
481 parser.add_argument( 496 parser.add_argument(
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 if e.is_infra_error: 931 if e.is_infra_error:
917 return constants.INFRA_EXIT_CODE 932 return constants.INFRA_EXIT_CODE
918 return constants.ERROR_EXIT_CODE 933 return constants.ERROR_EXIT_CODE
919 except: # pylint: disable=W0702 934 except: # pylint: disable=W0702
920 logging.exception('Unrecognized error occurred.') 935 logging.exception('Unrecognized error occurred.')
921 return constants.ERROR_EXIT_CODE 936 return constants.ERROR_EXIT_CODE
922 937
923 938
924 if __name__ == '__main__': 939 if __name__ == '__main__':
925 sys.exit(main()) 940 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/local/machine/local_machine_junit_test_run.py ('k') | build/android/test_runner.pydeps » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698