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 collections | 8 import collections |
9 import logging | 9 import logging |
10 import os | 10 import os |
11 import pickle | 11 import pickle |
12 import re | 12 import re |
13 import sys | 13 import sys |
14 | 14 |
15 from pylib import cmd_helper | 15 from pylib import cmd_helper |
16 from pylib import constants | 16 from pylib import constants |
17 | 17 |
18 sys.path.insert(0, | 18 sys.path.insert(0, |
19 os.path.join(constants.DIR_SOURCE_ROOT, | 19 os.path.join(constants.DIR_SOURCE_ROOT, |
20 'build', 'util', 'lib', 'common')) | 20 'build', 'util', 'lib', 'common')) |
21 | 21 |
22 import unittest_util | 22 import unittest_util # pylint: disable=F0401 |
23 | 23 |
24 # If you change the cached output of proguard, increment this number | 24 # If you change the cached output of proguard, increment this number |
25 PICKLE_FORMAT_VERSION = 1 | 25 PICKLE_FORMAT_VERSION = 1 |
26 | 26 |
27 | 27 |
28 class TestJar(object): | 28 class TestJar(object): |
29 _ANNOTATIONS = frozenset( | 29 _ANNOTATIONS = frozenset( |
30 ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest', 'EnormousTest', | 30 ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest', 'EnormousTest', |
31 'FlakyTest', 'DisabledTest', 'Manual', 'PerfTest', 'HostDrivenTest']) | 31 'FlakyTest', 'DisabledTest', 'Manual', 'PerfTest', 'HostDrivenTest']) |
32 _DEFAULT_ANNOTATION = 'SmallTest' | 32 _DEFAULT_ANNOTATION = 'SmallTest' |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 sanitized_test_names[t] for t in unittest_util.FilterTestNames( | 226 sanitized_test_names[t] for t in unittest_util.FilterTestNames( |
227 sanitized_test_names.keys(), test_filter.replace('#', '.'))] | 227 sanitized_test_names.keys(), test_filter.replace('#', '.'))] |
228 else: | 228 else: |
229 tests = available_tests | 229 tests = available_tests |
230 | 230 |
231 return tests | 231 return tests |
232 | 232 |
233 @staticmethod | 233 @staticmethod |
234 def IsHostDrivenTest(test): | 234 def IsHostDrivenTest(test): |
235 return 'pythonDrivenTests' in test | 235 return 'pythonDrivenTests' in test |
OLD | NEW |