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

Side by Side Diff: build/android/pylib/instrumentation/test_jar.py

Issue 23572019: [Android] Add HostDrivenTest java annotation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
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 6
7 import collections 7 import collections
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 12
13 from pylib import cmd_helper 13 from pylib import cmd_helper
14 from pylib import constants 14 from pylib import constants
15 15
16 16
17 # If you change the cached output of proguard, increment this number 17 # If you change the cached output of proguard, increment this number
18 PICKLE_FORMAT_VERSION = 1 18 PICKLE_FORMAT_VERSION = 1
19 19
20 20
21 class TestJar(object): 21 class TestJar(object):
22 _ANNOTATIONS = frozenset( 22 _ANNOTATIONS = frozenset(
23 ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest', 'EnormousTest', 23 ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest', 'EnormousTest',
24 'FlakyTest', 'DisabledTest', 'Manual', 'PerfTest']) 24 'FlakyTest', 'DisabledTest', 'Manual', 'PerfTest', 'HostDrivenTest'])
25 _DEFAULT_ANNOTATION = 'SmallTest' 25 _DEFAULT_ANNOTATION = 'SmallTest'
26 _PROGUARD_CLASS_RE = re.compile(r'\s*?- Program class:\s*([\S]+)$') 26 _PROGUARD_CLASS_RE = re.compile(r'\s*?- Program class:\s*([\S]+)$')
27 _PROGUARD_METHOD_RE = re.compile(r'\s*?- Method:\s*(\S*)[(].*$') 27 _PROGUARD_METHOD_RE = re.compile(r'\s*?- Method:\s*(\S*)[(].*$')
28 _PROGUARD_ANNOTATION_RE = re.compile(r'\s*?- Annotation \[L(\S*);\]:$') 28 _PROGUARD_ANNOTATION_RE = re.compile(r'\s*?- Annotation \[L(\S*);\]:$')
29 _PROGUARD_ANNOTATION_CONST_RE = ( 29 _PROGUARD_ANNOTATION_CONST_RE = (
30 re.compile(r'\s*?- Constant element value.*$')) 30 re.compile(r'\s*?- Constant element value.*$'))
31 _PROGUARD_ANNOTATION_VALUE_RE = re.compile(r'\s*?- \S+? \[(.*)\]$') 31 _PROGUARD_ANNOTATION_VALUE_RE = re.compile(r'\s*?- \S+? \[(.*)\]$')
32 32
33 def __init__(self, jar_path): 33 def __init__(self, jar_path):
34 if not os.path.exists(jar_path): 34 if not os.path.exists(jar_path):
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 tests = [t for t in available_tests 211 tests = [t for t in available_tests
212 if filter_without_hash in t.replace('#', '.')] 212 if filter_without_hash in t.replace('#', '.')]
213 else: 213 else:
214 tests = available_tests 214 tests = available_tests
215 215
216 return tests 216 return tests
217 217
218 @staticmethod 218 @staticmethod
219 def IsHostDrivenTest(test): 219 def IsHostDrivenTest(test):
220 return 'pythonDrivenTests' in test 220 return 'pythonDrivenTests' in test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698