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 |
11 import re | 11 import re |
12 import sys | 12 import sys |
13 | 13 |
14 from pylib import cmd_helper | 14 from devil.android import device_utils |
| 15 from devil.android import md5sum |
| 16 from devil.utils import cmd_helper |
15 from pylib import constants | 17 from pylib import constants |
16 from pylib.device import device_utils | |
17 from pylib.utils import md5sum | |
18 from pylib.utils import proguard | 18 from pylib.utils import proguard |
19 | 19 |
20 sys.path.insert(0, | 20 sys.path.insert(0, |
21 os.path.join(constants.DIR_SOURCE_ROOT, | 21 os.path.join(constants.DIR_SOURCE_ROOT, |
22 'build', 'util', 'lib', 'common')) | 22 'build', 'util', 'lib', 'common')) |
23 | 23 |
24 import unittest_util # pylint: disable=F0401 | 24 import unittest_util # pylint: disable=F0401 |
25 | 25 |
26 # If you change the cached output of proguard, increment this number | 26 # If you change the cached output of proguard, increment this number |
27 PICKLE_FORMAT_VERSION = 4 | 27 PICKLE_FORMAT_VERSION = 4 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 devices = device_utils.DeviceUtils.parallel(devices) | 222 devices = device_utils.DeviceUtils.parallel(devices) |
223 min_sdk_version = min(devices.build_version_sdk.pGet(None)) | 223 min_sdk_version = min(devices.build_version_sdk.pGet(None)) |
224 tests = [t for t in tests | 224 tests = [t for t in tests |
225 if self._IsTestValidForSdkRange(t, min_sdk_version)] | 225 if self._IsTestValidForSdkRange(t, min_sdk_version)] |
226 | 226 |
227 return tests | 227 return tests |
228 | 228 |
229 @staticmethod | 229 @staticmethod |
230 def IsHostDrivenTest(test): | 230 def IsHostDrivenTest(test): |
231 return 'pythonDrivenTests' in test | 231 return 'pythonDrivenTests' in test |
OLD | NEW |