summaryrefslogtreecommitdiff
path: root/scimark
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2015-02-24 00:50:21 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2015-02-25 13:49:40 +0000
commitfffaf0e1a9eb7fc0fcd45864a9acd1e4966b1146 (patch)
tree1754b6146539f331e45eabb4fc2276878712cbc1 /scimark
parent31b3072da4819e50a58f5f88949d3628aac46e19 (diff)
add test for SciMark
Change-Id: I1676f36ec84274df86ef4faf8451815e10c6037e Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'scimark')
-rwxr-xr-xscimark/execute.sh15
-rw-r--r--scimark/vc.py41
2 files changed, 56 insertions, 0 deletions
diff --git a/scimark/execute.sh b/scimark/execute.sh
new file mode 100755
index 0000000..7b4ae05
--- /dev/null
+++ b/scimark/execute.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+#need to be defined for different benchmark apks
+apk_package="net.danielroggen.scimark"
+activity="${apk_package}/.ActivityMain"
+apk_file_name="03-SciMark.apk"
+test_method="python vc.py"
+
+#following should no need to modify
+parent_dir=`dirname ${0}`
+source "${parent_dir}/../common/common.sh"
+
+base_url="http://testdata.validation.linaro.org/apks/JavaBenchmark/non-pure-java-benchmarks/"
+
+main "$@"
diff --git a/scimark/vc.py b/scimark/vc.py
new file mode 100644
index 0000000..40f1d0a
--- /dev/null
+++ b/scimark/vc.py
@@ -0,0 +1,41 @@
+import re
+import sys
+import os
+import time
+from subprocess import call
+
+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': False}
+vc = ViewClient(device, serialno, **kwargs2)
+vc.dump()
+
+btn_java_bench = vc.findViewWithTextOrRaise(u'Java bench')
+btn_java_bench.touch()
+
+keys = [ "FFT (1024)", "SOR (100x100)", "Monte Carlo", \
+ "Sparse matmult (N=1000, nz=5000)", "LU (100x100)", "Composite Score"]
+finished = False
+while(not finished):
+ try:
+ time.sleep(60)
+ vc.dump()
+ results = vc.findViewByIdOrRaise("net.danielroggen.scimark:id/textViewResult")
+ if results.getText().find("Done") > 0:
+ finished = True
+ print "benchmark finished"
+ for line in results.getText().replace(": ?", ":").split("?"):
+ key_val = line.split(":")
+ if len(key_val) == 2:
+ if key_val[0].strip() in keys:
+ key = key_val[0].strip().replace(' ', '_').replace('(', '').replace(')', '').replace(',', '')
+ print "%s=%s" % (key, key_val[1].strip())
+ call(['lava-test-case', key, '--result', 'pass', '--measurement', key_val[1].strip(), '--units', 'Mflops'])
+ except ViewNotFoundException:
+ pass
+ except RuntimeError:
+ pass
+ except ValueError:
+ pass