summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBotao Sun <botao.sun@linaro.org>2015-01-23 10:31:29 +1100
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2015-01-23 15:19:38 +0000
commitd138caf037b1894a5cb31c08b399afd84d4c2cdd (patch)
tree27cfaab5b45cd85096d48d6e5b41294f62ae4278
parent5f70e2a2d0295b82db44ed6b44e485e1c3c98db5 (diff)
Add Default Measurement Unit for SmartBench 2012.
Using "points" as the default measurement unit for SmartBench 2012 Test. Signed-off by: Botao Sun <botao.sun@linaro.org> Change-Id: I3060db1c3be2a48c9066828db690da643b0280d0
-rwxr-xr-xsmartbench2012/extract_results.sh4
-rwxr-xr-x[-rw-r--r--]smartbench2012/vc.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/smartbench2012/extract_results.sh b/smartbench2012/extract_results.sh
index dc5a1f9..4609f51 100755
--- a/smartbench2012/extract_results.sh
+++ b/smartbench2012/extract_results.sh
@@ -1,5 +1,7 @@
#!/bin/sh
SCORE=`awk -F'[][]' '/SBGlobal.nProductivityIndex/{k=$2}END{print k}' logcat.log`
+UNIT="points"
+
echo "Score is: $SCORE"
-lava-test-case SmartbenchScore --result pass --measurement $SCORE
+lava-test-case SmartbenchScore --result pass --measurement $SCORE --units $UNIT
diff --git a/smartbench2012/vc.py b/smartbench2012/vc.py
index 45ac82b..f756829 100644..100755
--- a/smartbench2012/vc.py
+++ b/smartbench2012/vc.py
@@ -6,12 +6,13 @@ from subprocess import call
from com.dtmilano.android.viewclient import ViewClient, ViewNotFoundException
+default_unit = 'points'
def get_score_with_text(vc, text, offset=1):
score_view = vc.findViewWithTextOrRaise(text)
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', text.strip(), '--result', 'pass', '--measurement', score.getText().strip()])
+ call(['lava-test-case', text.strip(), '--result', 'pass', '--measurement', score.getText().strip(), '--units', default_unit])
kwargs1 = {'verbose': False, 'ignoresecuredevice': False}
device, serialno = ViewClient.connectToDeviceOrExit(**kwargs1)