OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Helper class for instrumenation test jar.""" | 5 """Helper class for instrumenation test jar.""" |
6 # pylint: disable=W0702 | 6 # pylint: disable=W0702 |
7 | 7 |
8 import logging | 8 import logging |
9 import os | 9 import os |
10 import pickle | 10 import pickle |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 sanitized_test_names.keys(), test_filter.replace('#', '.'))] | 221 sanitized_test_names.keys(), test_filter.replace('#', '.'))] |
222 else: | 222 else: |
223 tests = available_tests | 223 tests = available_tests |
224 | 224 |
225 # Filter out any tests with SDK level requirements that don't match the set | 225 # Filter out any tests with SDK level requirements that don't match the set |
226 # of attached devices. | 226 # of attached devices. |
227 sdk_versions = [ | 227 sdk_versions = [ |
228 int(v) for v in | 228 int(v) for v in |
229 device_utils.DeviceUtils.parallel().GetProp( | 229 device_utils.DeviceUtils.parallel().GetProp( |
230 'ro.build.version.sdk').pGet(None)] | 230 'ro.build.version.sdk').pGet(None)] |
231 tests = filter( | 231 tests = [t for t in tests |
232 lambda t: self._IsTestValidForSdkRange(t, min(sdk_versions)), | 232 if self._IsTestValidForSdkRange(t, min(sdk_versions))] |
233 tests) | |
234 | 233 |
235 return tests | 234 return tests |
236 | 235 |
237 @staticmethod | 236 @staticmethod |
238 def IsHostDrivenTest(test): | 237 def IsHostDrivenTest(test): |
239 return 'pythonDrivenTests' in test | 238 return 'pythonDrivenTests' in test |
OLD | NEW |