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

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

Issue 1292313004: Update usage of Proguard in clank after moving Proguard to third_party. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jbudorick@'s 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/pylib/constants/__init__.py ('k') | build/android/pylib/utils/proguard.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 # 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 27 matching lines...) Expand all
38 _PROGUARD_METHOD_RE = re.compile(r'\s*?- Method:\s*(\S*)[(].*$') 38 _PROGUARD_METHOD_RE = re.compile(r'\s*?- Method:\s*(\S*)[(].*$')
39 _PROGUARD_ANNOTATION_RE = re.compile(r'\s*?- Annotation \[L(\S*);\]:$') 39 _PROGUARD_ANNOTATION_RE = re.compile(r'\s*?- Annotation \[L(\S*);\]:$')
40 _PROGUARD_ANNOTATION_CONST_RE = ( 40 _PROGUARD_ANNOTATION_CONST_RE = (
41 re.compile(r'\s*?- Constant element value.*$')) 41 re.compile(r'\s*?- Constant element value.*$'))
42 _PROGUARD_ANNOTATION_VALUE_RE = re.compile(r'\s*?- \S+? \[(.*)\]$') 42 _PROGUARD_ANNOTATION_VALUE_RE = re.compile(r'\s*?- \S+? \[(.*)\]$')
43 43
44 def __init__(self, jar_path): 44 def __init__(self, jar_path):
45 if not os.path.exists(jar_path): 45 if not os.path.exists(jar_path):
46 raise Exception('%s not found, please build it' % jar_path) 46 raise Exception('%s not found, please build it' % jar_path)
47 47
48 self._PROGUARD_PATH = os.path.join(constants.ANDROID_SDK_ROOT, 48 self._PROGUARD_PATH = os.path.join(constants.PROGUARD_ROOT,
49 'tools/proguard/lib/proguard.jar') 49 'lib', 'proguard.jar')
50 if not os.path.exists(self._PROGUARD_PATH): 50 if not os.path.exists(self._PROGUARD_PATH):
51 self._PROGUARD_PATH = os.path.join(os.environ['ANDROID_BUILD_TOP'], 51 self._PROGUARD_PATH = os.path.join(os.environ['ANDROID_BUILD_TOP'],
52 'external/proguard/lib/proguard.jar') 52 'external/proguard/lib/proguard.jar')
53 self._jar_path = jar_path 53 self._jar_path = jar_path
54 self._pickled_proguard_name = self._jar_path + '-proguard.pickle' 54 self._pickled_proguard_name = self._jar_path + '-proguard.pickle'
55 self._test_methods = {} 55 self._test_methods = {}
56 if not self._GetCachedProguardData(): 56 if not self._GetCachedProguardData():
57 self._GetProguardData() 57 self._GetProguardData()
58 58
59 def _GetCachedProguardData(self): 59 def _GetCachedProguardData(self):
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « build/android/pylib/constants/__init__.py ('k') | build/android/pylib/utils/proguard.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698