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

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

Issue 1371243002: [Android] Only remember non-None iteration results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | 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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 952
953 with environment_factory.CreateEnvironment(args, infra_error) as env: 953 with environment_factory.CreateEnvironment(args, infra_error) as env:
954 with test_instance_factory.CreateTestInstance(args, infra_error) as test: 954 with test_instance_factory.CreateTestInstance(args, infra_error) as test:
955 with test_run_factory.CreateTestRun( 955 with test_run_factory.CreateTestRun(
956 args, env, test, infra_error) as test_run: 956 args, env, test, infra_error) as test_run:
957 results = [] 957 results = []
958 repetitions = (xrange(args.repeat + 1) if args.repeat >= 0 958 repetitions = (xrange(args.repeat + 1) if args.repeat >= 0
959 else itertools.count()) 959 else itertools.count())
960 for _ in repetitions: 960 for _ in repetitions:
961 iteration_results = test_run.RunTests() 961 iteration_results = test_run.RunTests()
962 results.append(iteration_results)
963 962
964 if iteration_results is not None: 963 if iteration_results is not None:
964 results.append(iteration_results)
965 report_results.LogFull( 965 report_results.LogFull(
966 results=iteration_results, 966 results=iteration_results,
967 test_type=test.TestType(), 967 test_type=test.TestType(),
968 test_package=test_run.TestPackage(), 968 test_package=test_run.TestPackage(),
969 annotation=getattr(args, 'annotations', None), 969 annotation=getattr(args, 'annotations', None),
970 flakiness_server=getattr(args, 'flakiness_dashboard_server', 970 flakiness_server=getattr(args, 'flakiness_dashboard_server',
971 None)) 971 None))
972 972
973 if args.json_results_file: 973 if args.json_results_file:
974 json_results.GenerateJsonResultsFile( 974 json_results.GenerateJsonResultsFile(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 if e.is_infra_error: 1039 if e.is_infra_error:
1040 return constants.INFRA_EXIT_CODE 1040 return constants.INFRA_EXIT_CODE
1041 return constants.ERROR_EXIT_CODE 1041 return constants.ERROR_EXIT_CODE
1042 except: # pylint: disable=W0702 1042 except: # pylint: disable=W0702
1043 logging.exception('Unrecognized error occurred.') 1043 logging.exception('Unrecognized error occurred.')
1044 return constants.ERROR_EXIT_CODE 1044 return constants.ERROR_EXIT_CODE
1045 1045
1046 1046
1047 if __name__ == '__main__': 1047 if __name__ == '__main__':
1048 sys.exit(main()) 1048 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698