summaryrefslogtreecommitdiffstats
path: root/testrunner/test_defs/test_suite.py
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2015-05-21 12:25:05 -0700
committerSantos Cordon <santoscordon@google.com>2015-05-21 15:46:59 -0700
commit4e0ad8f8102fd2908ca34893b3acafaf518c4fac (patch)
treeefff8f055db26a5810cade25e0c70e48aaba840f /testrunner/test_defs/test_suite.py
parent19b0ecb1201ada24ac780a404ca6a769e3ba3b9d (diff)
downloadandroid_development-4e0ad8f8102fd2908ca34893b3acafaf518c4fac.tar.gz
android_development-4e0ad8f8102fd2908ca34893b3acafaf518c4fac.tar.bz2
android_development-4e0ad8f8102fd2908ca34893b3acafaf518c4fac.zip
Add flag to grant permissions when running tests.
This change automatically adds -g to all adb install commands for runtest. It also allows users to: 1) Specify '-k' as a command line arg to avoid granting permissions. 2) Declare a test suite as 'requiring permissions' within test_defs Also fixes a potential bug where continuous="false" would translate to True in the python code. Bug: 21327566 Change-Id: I62d14e8106174861397b3fd8caa3e567e3538713
Diffstat (limited to 'testrunner/test_defs/test_suite.py')
-rw-r--r--testrunner/test_defs/test_suite.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/testrunner/test_defs/test_suite.py b/testrunner/test_defs/test_suite.py
index d0bd9eef7..5bd9a1972 100644
--- a/testrunner/test_defs/test_suite.py
+++ b/testrunner/test_defs/test_suite.py
@@ -33,6 +33,7 @@ class AbstractTestSuite(object):
self._description = ''
self._extra_build_args = ''
self._is_full_make = False
+ self._is_granted_permissions = True
def GetName(self):
return self._name
@@ -65,6 +66,14 @@ class AbstractTestSuite(object):
self._is_continuous = continuous
return self._is_continuous
+ def IsGrantedPermissions(self):
+ """Return true if the test should be granted runtime permissions on install."""
+ return self._is_granted_permissions
+
+ def SetIsGrantedPermissions(self, is_granted_permissions):
+ self._is_granted_permissions = is_granted_permissions
+ return self._is_granted_permissions
+
def GetSuite(self):
"""Returns the name of test' suite, or None."""
return self._suite