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

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

Issue 1316803004: [Android] Set permission when installing apks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/gtest/test_runner.py ('k') | build/android/pylib/instrumentation/test_package.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/instrumentation/instrumentation_test_instance.py
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py
index 10ed63bdc5d178a7eeab39fb98886ad816246b0f..72c97f75f0025ece012d5e40725f73416c539231 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -140,11 +140,13 @@ class InstrumentationTestInstance(test_instance.TestInstance):
super(InstrumentationTestInstance, self).__init__()
self._apk_under_test = None
+ self._apk_under_test_permissions = None
self._package_info = None
self._suite = None
self._test_apk = None
self._test_jar = None
self._test_package = None
+ self._test_permissions = None
self._test_runner = None
self._test_support_apk = None
self._initializeApkAttributes(args, error_func)
@@ -180,6 +182,9 @@ class InstrumentationTestInstance(test_instance.TestInstance):
if not os.path.exists(self._apk_under_test):
error_func('Unable to find APK under test: %s' % self._apk_under_test)
+ apk = apk_helper.ApkHelper(self._apk_under_test)
+ self._apk_under_test_permissions = apk.GetPermissions()
+
if args.test_apk.endswith('.apk'):
self._suite = os.path.splitext(os.path.basename(args.test_apk))[0]
self._test_apk = args.test_apk
@@ -203,6 +208,7 @@ class InstrumentationTestInstance(test_instance.TestInstance):
apk = apk_helper.ApkHelper(self.test_apk)
self._test_package = apk.GetPackageName()
+ self._test_permissions = apk.GetPermissions()
self._test_runner = apk.GetInstrumentationName()
self._package_info = None
@@ -286,6 +292,10 @@ class InstrumentationTestInstance(test_instance.TestInstance):
return self._apk_under_test
@property
+ def apk_under_test_permissions(self):
+ return self._apk_under_test_permissions
+
+ @property
def flags(self):
return self._flags
@@ -326,6 +336,10 @@ class InstrumentationTestInstance(test_instance.TestInstance):
return self._test_package
@property
+ def test_permissions(self):
+ return self._test_permissions
+
+ @property
def test_runner(self):
return self._test_runner
« no previous file with comments | « build/android/pylib/gtest/test_runner.py ('k') | build/android/pylib/instrumentation/test_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698