summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2015-11-18 22:44:09 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2015-11-18 22:49:08 +0800
commit31282d6baba182be7fa4ce1ec95a49aee73426d3 (patch)
treeb7f26dfdaa417c3f07f59a768a44708f4b3f35df
parentd9e0e024e179fcd86bf02c49a3eabe99ed57a785 (diff)
andebenchpro: increase the timeout value to 60 minutes
10 minute is not enough to run andebench on marshmallow builds, set it to 60 minutes although it will be finished in about 20 minutes. The timeout value in jobs will make it not take too lang time to use the device resources. Also fix some code in vc.py Change-Id: Ib6dea6f525edb861e765f153507df794119f7fe2 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rwxr-xr-xandebenchpro/execute.sh1
-rw-r--r--andebenchpro/vc.py21
2 files changed, 18 insertions, 4 deletions
diff --git a/andebenchpro/execute.sh b/andebenchpro/execute.sh
index 47a6e03..dc00a4f 100755
--- a/andebenchpro/execute.sh
+++ b/andebenchpro/execute.sh
@@ -52,4 +52,5 @@ function get_result(){
done
}
pre_uninstall="get_result"
+timeout=60m
main "$@"
diff --git a/andebenchpro/vc.py b/andebenchpro/vc.py
index 375a0ed..820d998 100644
--- a/andebenchpro/vc.py
+++ b/andebenchpro/vc.py
@@ -11,16 +11,29 @@ device, serialno = ViewClient.connectToDeviceOrExit(**kwargs1)
kwargs2 = {'startviewserver': True, 'forceviewserveruse': False, 'autodump': False, 'ignoreuiautomatorkilled': True, 'compresseddump': False}
vc = ViewClient(device, serialno, **kwargs2)
+def dump_always():
+ success = False
+ while not success:
+ try:
+ vc.dump()
+ success = True
+ except RuntimeError:
+ print("Got RuntimeError when call vc.dump()")
+ time.sleep(5)
+ except ValueError:
+ print("Got ValueError when call vc.dump()")
+ time.sleep(5)
+
+
time.sleep(2)
-vc.dump()
+dump_always()
btn_license = vc.findViewWithText(u'I Agree')
if btn_license:
btn_license.touch()
while True:
try:
- time.sleep(5)
- vc.dump()
+ dump_always()
btn_start_on = vc.findViewByIdOrRaise("com.eembc.andebench:id/s1_runall")
btn_start_on.touch()
break
@@ -34,7 +47,7 @@ while True:
while(True):
try:
time.sleep(30)
- vc.dump('-1')
+ dump_always()
vc.findViewByIdOrRaise("com.eembc.andebench:id/view_web_button")
vc.findViewWithTextOrRaise(u'3D').touch()