summaryrefslogtreecommitdiff
path: root/automated/android
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2017-09-08 15:16:14 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2017-09-08 15:16:14 +0800
commit3ad29680969fba7f6ea4c73e44d4151f13c9d08a (patch)
tree3a81bba873ee1433e94a748129dceaa3a8bc0bf7 /automated/android
parent586e26d0a6e7cd547fddf59a28e1634af87755d9 (diff)
android quadrantpro: change to run in permissive mode
also kill the first time start since it could not display successfully, and no log output to show what's the problem there. after killed the first time start up, it works well in permissive mode from the 2nd time start up Change-Id: I04e91371d0e4babd57d72654924bd1d0bc543d65 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'automated/android')
-rwxr-xr-xautomated/android/apk-automation/quadrantpro.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/automated/android/apk-automation/quadrantpro.py b/automated/android/apk-automation/quadrantpro.py
index 6c39028..8ca7b0d 100755
--- a/automated/android/apk-automation/quadrantpro.py
+++ b/automated/android/apk-automation/quadrantpro.py
@@ -10,6 +10,14 @@ class ApkRunnerImpl(ApkTestRunner):
self.config['activity'] = 'com.aurorasoftworks.quadrant.ui.professional/.QuadrantProfessionalLauncherActivity'
super(ApkRunnerImpl, self).__init__(self.config)
+ def setUp(self):
+ self.call_adb('shell setenforce 0')
+ super(ApkRunnerImpl, self).setUp()
+
+ def tearDown(self):
+ self.call_adb('shell setenforce 1')
+ super(ApkRunnerImpl, self).tearDown()
+
def execute(self):
self.dump_always()
view_license_btn = self.vc.findViewWithText("View license")
@@ -21,6 +29,20 @@ class ApkRunnerImpl(ApkTestRunner):
run_full_item = self.vc.findViewWithTextOrRaise(u'Run full benchmark')
run_full_item.touch()
+ # Hack workaround to kill the first time start up
+ # then it will work from 2nd time
+ self.call_adb("shell am force-stop %s" % self.config['apk_package'])
+ self.call_adb("shell am start -W -S %s" % self.config['activity'])
+ self.dump_always()
+ view_license_btn = self.vc.findViewWithText("View license")
+ if view_license_btn:
+ ok_button = self.vc.findViewWithTextOrRaise("OK")
+ ok_button.touch()
+
+ self.dump_always()
+ run_full_item = self.vc.findViewWithTextOrRaise(u'Run full benchmark')
+ run_full_item.touch()
+
finished = False
while not finished:
try: