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

Unified Diff: build/android/pylib/apk_info.py

Issue 11273099: Restart app before running monkey test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed bulach's comments Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | build/android/run_monkey_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/apk_info.py
diff --git a/build/android/pylib/apk_info.py b/build/android/pylib/apk_info.py
index 7e8867570bbfdbbb65812c8fe4e05d0028836799..13b338f1c27cb170c6aae5bcde1cbe58736224af 100644
--- a/build/android/pylib/apk_info.py
+++ b/build/android/pylib/apk_info.py
@@ -13,19 +13,21 @@ import cmd_helper
class ApkInfo(object):
"""Helper class for inspecting APKs."""
- _PROGUARD_PATH = os.path.join(os.environ['ANDROID_SDK_ROOT'],
- 'tools/proguard/bin/proguard.sh')
- if not os.path.exists(_PROGUARD_PATH):
- _PROGUARD_PATH = os.path.join(os.environ['ANDROID_BUILD_TOP'],
- 'external/proguard/bin/proguard.sh')
- _PROGUARD_CLASS_RE = re.compile(r'\s*?- Program class:\s*([\S]+)$')
- _PROGUARD_METHOD_RE = re.compile(r'\s*?- Method:\s*(\S*)[(].*$')
- _PROGUARD_ANNOTATION_RE = re.compile(r'\s*?- Annotation \[L(\S*);\]:$')
- _PROGUARD_ANNOTATION_CONST_RE = re.compile(r'\s*?- Constant element value.*$')
- _PROGUARD_ANNOTATION_VALUE_RE = re.compile(r'\s*?- \S+? \[(.*)\]$')
- _AAPT_PACKAGE_NAME_RE = re.compile(r'package: .*name=\'(\S*)\'')
def __init__(self, apk_path, jar_path):
+ self._PROGUARD_PATH = os.path.join(os.environ['ANDROID_SDK_ROOT'],
+ 'tools/proguard/bin/proguard.sh')
+ if not os.path.exists(self._PROGUARD_PATH):
+ self._PROGUARD_PATH = os.path.join(os.environ['ANDROID_BUILD_TOP'],
+ 'external/proguard/bin/proguard.sh')
+ self._PROGUARD_CLASS_RE = re.compile(r'\s*?- Program class:\s*([\S]+)$')
+ self._PROGUARD_METHOD_RE = re.compile(r'\s*?- Method:\s*(\S*)[(].*$')
+ self._PROGUARD_ANNOTATION_RE = re.compile(r'\s*?- Annotation \[L(\S*);\]:$')
+ self._PROGUARD_ANNOTATION_CONST_RE = (
+ re.compile(r'\s*?- Constant element value.*$'))
+ self._PROGUARD_ANNOTATION_VALUE_RE = re.compile(r'\s*?- \S+? \[(.*)\]$')
+ self._AAPT_PACKAGE_NAME_RE = re.compile(r'package: .*name=\'(\S*)\'')
+
if not os.path.exists(apk_path):
raise Exception('%s not found, please build it' % apk_path)
self._apk_path = apk_path
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | build/android/run_monkey_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698