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

Unified Diff: build/android/pylib/instrumentation/test_package.py

Issue 19799003: [android] Instumentation tests determine whether to install test apk based on Md5Sum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: automatically install package to be tested Created 7 years, 5 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
Index: build/android/pylib/instrumentation/test_package.py
diff --git a/build/android/pylib/instrumentation/test_package.py b/build/android/pylib/instrumentation/test_package.py
index 34f9fe867ac468d408b5a760de9091d707339c2c..fa59c44f409accd0f67e881abacf1addeb298aa6 100644
--- a/build/android/pylib/instrumentation/test_package.py
+++ b/build/android/pylib/instrumentation/test_package.py
@@ -11,6 +11,10 @@ from pylib.utils import apk_helper
import test_jar
+def _rreplace(s, old, new, occurrence=1):
+ li = s.rsplit(old, occurrence)
+ return new.join(li)
+
class TestPackage(test_jar.TestJar):
def __init__(self, apk_path, jar_path):
test_jar.TestJar.__init__(self, jar_path)
@@ -36,3 +40,7 @@ class TestPackage(test_jar.TestJar):
# Override.
def Install(self, adb):
adb.ManagedInstall(self.GetApkPath(), package_name=self.GetPackageName())
+ # Install apk to be tested.
frankf 2013/07/20 02:18:35 a debugging session?
craigdh 2013/07/22 19:03:14 This installs the actual apk to be tested by remov
+ apk_path = _rreplace(self.GetApkPath(), 'Test.apk', '.apk')
+ package_name = _rreplace(self.GetPackageName(), '.tests', '')
+ adb.ManagedInstall(apk_path, package_name=package_name)

Powered by Google App Engine
This is Rietveld 408576698