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

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

Issue 2583613002: [Android] Add ability to generate test trace json for perf tests runs. (Closed)
Patch Set: Move to context manager 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
« no previous file with comments | « build/android/pylib/perf/perf_test_instance.py ('k') | build/android/test_runner.pydeps » ('j') | 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 group.add_argument('--known-devices-file', help='Path to known device list.') 549 group.add_argument('--known-devices-file', help='Path to known device list.')
550 group.add_argument( 550 group.add_argument(
551 '--repeat', dest='repeat', type=int, default=0, 551 '--repeat', dest='repeat', type=int, default=0,
552 help='Number of times to repeat the specified set of tests.') 552 help='Number of times to repeat the specified set of tests.')
553 group.add_argument( 553 group.add_argument(
554 '--break-on-failure', '--break_on_failure', dest='break_on_failure', 554 '--break-on-failure', '--break_on_failure', dest='break_on_failure',
555 action='store_true', help='Whether to break on failure.') 555 action='store_true', help='Whether to break on failure.')
556 group.add_argument( 556 group.add_argument(
557 '--write-buildbot-json', action='store_true', 557 '--write-buildbot-json', action='store_true',
558 help='Whether to output buildbot json.') 558 help='Whether to output buildbot json.')
559 # TODO(rnephew): Move up to top level options when implemented on all tests.
560 group.add_argument(
561 '--trace-output', metavar='FILENAME', type=os.path.realpath,
562 help='Path to save test_runner trace data to.')
559 AddCommonOptions(parser) 563 AddCommonOptions(parser)
560 AddDeviceOptions(parser) 564 AddDeviceOptions(parser)
561 565
562 566
563 def AddPythonTestOptions(parser): 567 def AddPythonTestOptions(parser):
564 group = parser.add_argument_group('Python Test Options') 568 group = parser.add_argument_group('Python Test Options')
565 group.add_argument( 569 group.add_argument(
566 '-s', '--suite', dest='suite_name', metavar='SUITE_NAME', 570 '-s', '--suite', dest='suite_name', metavar='SUITE_NAME',
567 choices=constants.PYTHON_UNIT_TEST_SUITES.keys(), 571 choices=constants.PYTHON_UNIT_TEST_SUITES.keys(),
568 help='Name of the test suite to run.') 572 help='Name of the test suite to run.')
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 if e.is_infra_error: 884 if e.is_infra_error:
881 return constants.INFRA_EXIT_CODE 885 return constants.INFRA_EXIT_CODE
882 return constants.ERROR_EXIT_CODE 886 return constants.ERROR_EXIT_CODE
883 except: # pylint: disable=W0702 887 except: # pylint: disable=W0702
884 logging.exception('Unrecognized error occurred.') 888 logging.exception('Unrecognized error occurred.')
885 return constants.ERROR_EXIT_CODE 889 return constants.ERROR_EXIT_CODE
886 890
887 891
888 if __name__ == '__main__': 892 if __name__ == '__main__':
889 sys.exit(main()) 893 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/perf/perf_test_instance.py ('k') | build/android/test_runner.pydeps » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698