summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2016-11-17 13:06:25 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2016-11-17 13:06:25 +0800
commit1f9211c29695b67fd6301a60ad2c5c0bbbe4215d (patch)
tree56c6db150e7cccf3e46ddb9ffd3668a2f0548b7e
parent3640be3c39fbf797ca7050c7ec14d48d406f79c0 (diff)
glbenchmark-2.5.1: small improvement
check the object before call touch Change-Id: I07350554baea309a106e4befff244163e63d38aa Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rwxr-xr-xglbenchmark-2.5.1/glbenchmark_first_launch.py7
-rwxr-xr-xglbenchmark-2.5.1/vc.py5
2 files changed, 7 insertions, 5 deletions
diff --git a/glbenchmark-2.5.1/glbenchmark_first_launch.py b/glbenchmark-2.5.1/glbenchmark_first_launch.py
index 1a153d2..67e920e 100755
--- a/glbenchmark-2.5.1/glbenchmark_first_launch.py
+++ b/glbenchmark-2.5.1/glbenchmark_first_launch.py
@@ -15,9 +15,10 @@ time.sleep(5)
vc.dump(window='-1')
target_app = vc.findViewWithText("GLBenchmark 2.5.1")
-target_app.touch()
-print "GLBenchmark 2.5.1 touched!"
-time.sleep(15)
+if target_app:
+ target_app.touch()
+ print "GLBenchmark 2.5.1 touched!"
+ time.sleep(15)
device.press('KEYCODE_BACK')
time.sleep(3)
diff --git a/glbenchmark-2.5.1/vc.py b/glbenchmark-2.5.1/vc.py
index e810b19..182d76c 100755
--- a/glbenchmark-2.5.1/vc.py
+++ b/glbenchmark-2.5.1/vc.py
@@ -52,8 +52,9 @@ time.sleep(2)
vc.dump(window='-1')
test_type = vc.findViewWithText("Performance Tests")
-test_type.touch()
-time.sleep(2)
+if test_type:
+ test_type.touch()
+ time.sleep(2)
# By some reason in order to select all test, a back step is required
vc.dump(window='-1')