diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2015-11-17 12:23:25 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2015-11-17 12:26:16 +0800 |
commit | d9e0e024e179fcd86bf02c49a3eabe99ed57a785 (patch) | |
tree | 5e77a9391a62dd84a84af17a5193f3c330cfbb32 | |
parent | 6b87ec47b5d1951a29175ddc1cb1f6692ca0ae59 (diff) |
quadrantpro: fix the problem for parsing result
use "adb logcat -d -v brief" to get fixed format output
Change-Id: I98e8399c7da8d1143f4e75c2d2054d2e9017654e
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rwxr-xr-x | quadrantpro/execute.sh | 4 | ||||
-rwxr-xr-x | quadrantpro/vc.py | 21 |
2 files changed, 19 insertions, 6 deletions
diff --git a/quadrantpro/execute.sh b/quadrantpro/execute.sh index dd59dc3..a79b64f 100755 --- a/quadrantpro/execute.sh +++ b/quadrantpro/execute.sh @@ -12,13 +12,13 @@ source "${parent_dir}/../common/common.sh" get_result(){ local local_f_logcat="${D_RAWDATA}/quadrandpro.logcat" - adb logcat -d >${local_f_logcat} + adb logcat -d -v brief>${local_f_logcat} for line in $(grep 'aggregate score is' ${local_f_logcat}|cut -d: -f2|sed 's/aggregate score is//g'|tr -s ' '|sed 's/^ //'|tr ' ' ','); do line=$(echo $line|sed 's/\r//g') key=$(echo $line|cut -d, -f1) value=$(echo $line|cut -d\, -f2) output_test_result "quadrandpro_${key}" "pass" "${value}" "points" - done + done } pre_uninstall="get_result" diff --git a/quadrantpro/vc.py b/quadrantpro/vc.py index a55e8e5..57b5699 100755 --- a/quadrantpro/vc.py +++ b/quadrantpro/vc.py @@ -15,21 +15,34 @@ kwargs2 = {'startviewserver': True, 'forceviewserveruse': False, 'autodump': Fal vc = ViewClient(device, serialno, **kwargs2) -vc.dump() +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) + + +dump_always() view_license_btn = vc.findViewWithText("View license") if view_license_btn: ok_button = vc.findViewWithTextOrRaise("OK") ok_button.touch() -vc.dump() +dump_always() run_full_item=vc.findViewWithTextOrRaise(u'Run full benchmark') run_full_item.touch() finished = False while(not finished): try: - time.sleep(5) - vc.dump() + dump_always() vc.findViewByIdOrRaise("com.aurorasoftworks.quadrant.ui.professional:id/chart") finished = True print "Benchmark finished" |