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

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

Issue 1839083003: [Android] Switch instrumentation tests to platform mode. (RELAND 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix # instrumentation test filters Created 4 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
« no previous file with comments | « build/android/pylib/local/device/local_device_instrumentation_test_run.py ('k') | 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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 970
971 Raises: 971 Raises:
972 Exception: Unknown command name passed in, or an exception from an 972 Exception: Unknown command name passed in, or an exception from an
973 individual test runner. 973 individual test runner.
974 """ 974 """
975 command = args.command 975 command = args.command
976 976
977 ProcessCommonOptions(args) 977 ProcessCommonOptions(args)
978 logging.info('command: %s', ' '.join(sys.argv)) 978 logging.info('command: %s', ' '.join(sys.argv))
979 979
980 if args.enable_platform_mode: 980 if args.enable_platform_mode or command in ('gtest', 'instrumentation'):
981 return RunTestsInPlatformMode(args) 981 return RunTestsInPlatformMode(args)
982 982
983 forwarder.Forwarder.RemoveHostLog() 983 forwarder.Forwarder.RemoveHostLog()
984 if not ports.ResetTestServerPortAllocation(): 984 if not ports.ResetTestServerPortAllocation():
985 raise Exception('Failed to reset test server port.') 985 raise Exception('Failed to reset test server port.')
986 986
987 def get_devices(): 987 def get_devices():
988 return _GetAttachedDevices(args.blacklist_file, args.test_device, 988 return _GetAttachedDevices(args.blacklist_file, args.test_device,
989 args.enable_device_cache) 989 args.enable_device_cache)
990 990
991 if command == 'gtest': 991 if command == 'linker':
992 return RunTestsInPlatformMode(args)
993 elif command == 'linker':
994 return _RunLinkerTests(args, get_devices()) 992 return _RunLinkerTests(args, get_devices())
995 elif command == 'instrumentation':
996 return _RunInstrumentationTests(args, get_devices())
997 elif command == 'junit': 993 elif command == 'junit':
998 return _RunJUnitTests(args) 994 return _RunJUnitTests(args)
999 elif command == 'monkey': 995 elif command == 'monkey':
1000 return _RunMonkeyTests(args, get_devices()) 996 return _RunMonkeyTests(args, get_devices())
1001 elif command == 'perf': 997 elif command == 'perf':
1002 return _RunPerfTests(args, get_devices()) 998 return _RunPerfTests(args, get_devices())
1003 elif command == 'python': 999 elif command == 'python':
1004 return _RunPythonTests(args) 1000 return _RunPythonTests(args)
1005 else: 1001 else:
1006 raise Exception('Unknown test type.') 1002 raise Exception('Unknown test type.')
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 if e.is_infra_error: 1137 if e.is_infra_error:
1142 return constants.INFRA_EXIT_CODE 1138 return constants.INFRA_EXIT_CODE
1143 return constants.ERROR_EXIT_CODE 1139 return constants.ERROR_EXIT_CODE
1144 except: # pylint: disable=W0702 1140 except: # pylint: disable=W0702
1145 logging.exception('Unrecognized error occurred.') 1141 logging.exception('Unrecognized error occurred.')
1146 return constants.ERROR_EXIT_CODE 1142 return constants.ERROR_EXIT_CODE
1147 1143
1148 1144
1149 if __name__ == '__main__': 1145 if __name__ == '__main__':
1150 sys.exit(main()) 1146 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/local/device/local_device_instrumentation_test_run.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698