summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2016-08-26 16:15:33 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2016-08-26 16:15:33 +0800
commit81c516e6ff8e975e361903e15da0aff7c4d8f0a8 (patch)
tree7b7aff025be3ff02393c44c6e80675d09341829b
parentb1b4f37f95c23ac82b477ad6b3397b34a4f9034a (diff)
run all test for andebenchpro2015
Change-Id: I1b514b348c097461a893995aa4c9df4705ad6c34 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r--andebenchpro2015/vc.py55
1 files changed, 26 insertions, 29 deletions
diff --git a/andebenchpro2015/vc.py b/andebenchpro2015/vc.py
index 42c6a69..cfd8441 100644
--- a/andebenchpro2015/vc.py
+++ b/andebenchpro2015/vc.py
@@ -8,14 +8,9 @@ from com.dtmilano.android.viewclient import ViewClient, ViewNotFoundException
kwargs1 = {'verbose': False, 'ignoresecuredevice': False}
device, serialno = ViewClient.connectToDeviceOrExit(**kwargs1)
-kwargs2 = {'startviewserver': True,
- 'forceviewserveruse': False,
- 'autodump': False,
- 'ignoreuiautomatorkilled': True,
- 'compresseddump': True}
+kwargs2 = {'startviewserver': True, 'forceviewserveruse': False, 'autodump': False, 'ignoreuiautomatorkilled': True, 'compresseddump': True}
vc = ViewClient(device, serialno, **kwargs2)
-
def dump_always():
success = False
while not success:
@@ -37,42 +32,44 @@ if btn_license:
btn_license.touch()
-# disable graphics
-time.sleep(3)
-dump_always()
-item = vc.findViewById("com.eembc.andebench:id/ab_icon")
-if item:
- item.touch()
+def disable_graphics():
+ # disable graphics
time.sleep(3)
dump_always()
- item = vc.findViewWithText(u'Options')
+ item = vc.findViewById("com.eembc.andebench:id/ab_icon")
if item:
item.touch()
time.sleep(3)
dump_always()
- opt_expandableListView1 = vc.findViewByIdOrRaise("com.eembc.andebench:"
- "id/opt_expandable"
- "ListView1")
- if opt_expandableListView1:
- for sub in opt_expandableListView1.children:
- if not vc.findViewWithText(u'Graphics', sub):
- vc.findViewByIdOrRaise("com.eembc.andebench:id/cbx1",
- sub).touch()
- time.sleep(3)
- dump_always()
-
- vc.findViewByIdOrRaise(
- "com.eembc.andebench:id/ab_icon").touch()
+ item = vc.findViewWithText(u'Options')
+ if item:
+ item.touch()
time.sleep(3)
dump_always()
- vc.findViewWithTextOrRaise(u'Home').touch()
+ opt_expandableListView1 = vc.findViewByIdOrRaise("com.eembc.andebench:"
+ "id/opt_expandable"
+ "ListView1")
+ if opt_expandableListView1:
+ for sub in opt_expandableListView1.children:
+ if vc.findViewWithText(u'Graphics', sub):
+ vc.findViewByIdOrRaise("com.eembc.andebench:id/cbx1",
+ sub).touch()
+ time.sleep(3)
+ dump_always()
+
+ vc.findViewByIdOrRaise(
+ "com.eembc.andebench:id/ab_icon").touch()
+ time.sleep(3)
+ dump_always()
+ vc.findViewWithTextOrRaise(u'Home').touch()
+
+#disable_graphics()
while True:
try:
dump_always()
- btn_start_on = vc.findViewByIdOrRaise("com.eembc.andebench:id"
- "/s1_runall")
+ btn_start_on = vc.findViewByIdOrRaise("com.eembc.andebench:id/s1_runall")
btn_start_on.touch()
break
except ViewNotFoundException: