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

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

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

Powered by Google App Engine
This is Rietveld 408576698