diff options
author | Botao Sun <botao.sun@linaro.org> | 2015-01-23 10:04:59 +1100 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2015-01-23 15:17:47 +0000 |
commit | 21ba8e07eead545621f12e4dd3dcbf2a6e5b8afa (patch) | |
tree | 742bf7b85e3d05fa89602e415d63b9f8aea1187a | |
parent | 587338191fe3782b9b8dcab9fc7af4f78efb20d8 (diff) |
Add Default Measurement Unit for GFXBench 3.
Using "points" as the default measurement unit for GFXBench 3 Test.
Signed-off by: Botao Sun <botao.sun@linaro.org>
Change-Id: I5c75a7065ffe83e4416174e37ef168871259c934
-rwxr-xr-x[-rw-r--r--] | GFXBench3/vc.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/GFXBench3/vc.py b/GFXBench3/vc.py index 50ca7fd..abf2eaa 100644..100755 --- a/GFXBench3/vc.py +++ b/GFXBench3/vc.py @@ -6,13 +6,14 @@ from subprocess import call from com.dtmilano.android.viewclient import ViewClient, ViewNotFoundException +default_unit = 'points' def get_score_with_content_desc(vc, content_desc, offset=1): score_view = vc.findViewWithText(content_desc) score_uid = score_view.getUniqueId() uid = int(re.search("id/no_id/(?P<uid>\d+)", score_uid).group('uid')) score = vc.findViewByIdOrRaise("id/no_id/%s" % (uid + offset)) - call(['lava-test-case', content_desc, '--result', 'pass', '--measurement', score.getText()) - + call(['lava-test-case', content_desc, '--result', 'pass', '--measurement', score.getText(), '--units', default_unit) + kwargs1 = {'verbose': False, 'ignoresecuredevice': False} device, serialno = ViewClient.connectToDeviceOrExit(**kwargs1) kwargs2 = {'startviewserver': True, 'forceviewserveruse': False, 'autodump': False, 'ignoreuiautomatorkilled': True} @@ -20,23 +21,23 @@ vc = ViewClient(device, serialno, **kwargs2) time.sleep(2) vc.dump(window='-1') -#Accept License +# Accept License btn_license = vc.findViewByIdOrRaise("android:id/button1") btn_license.touch() vc.dump(window='-1') -#Accept Active Internet connection +# Accept Active Internet connection btn_accept = vc.findViewByIdOrRaise("android:id/button1") btn_accept.touch() time.sleep(15) vc.dump(window='-1') -#Accept Data Sync and Download content +# Accept Data Sync and Download content btn_accept_1 = vc.findViewByIdOrRaise("android:id/button1") btn_accept_1.touch() vc.dump(window='-1') -#Wait for download to finish +# Wait for download to finish finished = False while (not finished): time.sleep(50) @@ -49,11 +50,11 @@ while (not finished): except RuntimeError as e: print e -#Start benchmark +# Start benchmark test = vc.findViewByIdOrRaise("id/no_id/1") test.touch() -#Wait while benchmark is running +# Wait while benchmark is running finished = False while (not finished): time.sleep(50) @@ -67,7 +68,7 @@ while (not finished): print e print "benchmark finished" -#Fetch Scores +# Fetch Scores get_score_with_content_desc(vc, "Manhattan", 5) get_score_with_content_desc(vc, "1080p Manhattan Offscreen", 5) get_score_with_content_desc(vc, "T-Rex", 5) @@ -80,7 +81,7 @@ get_score_with_content_desc(vc, "Driver Overhead", 5) get_score_with_content_desc(vc, "1080p Driver Overhead Offscreen", 5) get_score_with_content_desc(vc, "Fill", 5) -#Drag down to get rest of the test score +# Drag down to get rest of the test score device.drag((300,1000), (300,300), 500) get_score_with_content_desc(vc, "Render Quality", 5) |