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

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

Issue 1334803002: Revert of [Android] Don't use a device blacklist if one isn't provided. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/screenshot.py ('k') | build/android/tombstones.py » ('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 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 887
888 def _GetAttachedDevices(blacklist_file, test_device): 888 def _GetAttachedDevices(blacklist_file, test_device):
889 """Get all attached devices. 889 """Get all attached devices.
890 890
891 Args: 891 Args:
892 test_device: Name of a specific device to use. 892 test_device: Name of a specific device to use.
893 893
894 Returns: 894 Returns:
895 A list of attached devices. 895 A list of attached devices.
896 """ 896 """
897 blacklist = (device_blacklist.Blacklist(blacklist_file) 897 if not blacklist_file:
898 if blacklist_file 898 # TODO(jbudorick): Remove this once bots pass the blacklist file.
899 else None) 899 blacklist_file = device_blacklist.BLACKLIST_JSON
900 logging.warning('Using default device blacklist %s',
901 device_blacklist.BLACKLIST_JSON)
900 902
903 blacklist = device_blacklist.Blacklist(blacklist_file)
901 attached_devices = device_utils.DeviceUtils.HealthyDevices(blacklist) 904 attached_devices = device_utils.DeviceUtils.HealthyDevices(blacklist)
902 if test_device: 905 if test_device:
903 test_device = [d for d in attached_devices if d == test_device] 906 test_device = [d for d in attached_devices if d == test_device]
904 if not test_device: 907 if not test_device:
905 raise device_errors.DeviceUnreachableError( 908 raise device_errors.DeviceUnreachableError(
906 'Did not find device %s among attached device. Attached devices: %s' 909 'Did not find device %s among attached device. Attached devices: %s'
907 % (test_device, ', '.join(attached_devices))) 910 % (test_device, ', '.join(attached_devices)))
908 return test_device 911 return test_device
909 912
910 else: 913 else:
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 if e.is_infra_error: 1065 if e.is_infra_error:
1063 return constants.INFRA_EXIT_CODE 1066 return constants.INFRA_EXIT_CODE
1064 return constants.ERROR_EXIT_CODE 1067 return constants.ERROR_EXIT_CODE
1065 except: # pylint: disable=W0702 1068 except: # pylint: disable=W0702
1066 logging.exception('Unrecognized error occurred.') 1069 logging.exception('Unrecognized error occurred.')
1067 return constants.ERROR_EXIT_CODE 1070 return constants.ERROR_EXIT_CODE
1068 1071
1069 1072
1070 if __name__ == '__main__': 1073 if __name__ == '__main__':
1071 sys.exit(main()) 1074 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/screenshot.py ('k') | build/android/tombstones.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698