summaryrefslogtreecommitdiff
path: root/automated
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2016-11-01 21:25:37 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-11-02 20:53:59 +0000
commit4a05e6ddffb3a037d5e67dd50a730c2a5b4af0f4 (patch)
treead674ab97cc4dc0839f635e6cbb43d9e8de2825b /automated
parent75a1fcf916f6a5c970d3c5afeeecdf56efbb9fbf (diff)
v2: linux: add linpack test
Change-Id: Ifcce69a08e4c561954c31d3748f0979b162e473c Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated')
-rw-r--r--automated/linux/linpack/bin/README5
-rwxr-xr-xautomated/linux/linpack/bin/arm64/linpackbin0 -> 647416 bytes
-rwxr-xr-xautomated/linux/linpack/bin/armeabi/linpackbin0 -> 470308 bytes
-rwxr-xr-xautomated/linux/linpack/linpack.sh37
-rw-r--r--automated/linux/linpack/linpack.yaml31
5 files changed, 73 insertions, 0 deletions
diff --git a/automated/linux/linpack/bin/README b/automated/linux/linpack/bin/README
new file mode 100644
index 0000000..4fa5d16
--- /dev/null
+++ b/automated/linux/linpack/bin/README
@@ -0,0 +1,5 @@
+The source can be viewed here: http://www.netlib.org/benchmark/linpackc.new
+
+The binaries included here are compiled with the following commands:
+# mv linpackc.new linpack.c
+# gcc -O3 -static -o linpack linpack.c -lm
diff --git a/automated/linux/linpack/bin/arm64/linpack b/automated/linux/linpack/bin/arm64/linpack
new file mode 100755
index 0000000..e494d8d
--- /dev/null
+++ b/automated/linux/linpack/bin/arm64/linpack
Binary files differ
diff --git a/automated/linux/linpack/bin/armeabi/linpack b/automated/linux/linpack/bin/armeabi/linpack
new file mode 100755
index 0000000..f6a09b7
--- /dev/null
+++ b/automated/linux/linpack/bin/armeabi/linpack
Binary files differ
diff --git a/automated/linux/linpack/linpack.sh b/automated/linux/linpack/linpack.sh
new file mode 100755
index 0000000..d99af91
--- /dev/null
+++ b/automated/linux/linpack/linpack.sh
@@ -0,0 +1,37 @@
+#!/bin/sh -e
+
+. ../../lib/sh-test-lib
+OUTPUT="$(pwd)/output"
+ARRAY_SIZE="200"
+RESULT_FILE="${OUTPUT}/result.txt"
+TEST_LOG="${OUTPUT}/linpack-output.txt"
+
+usage() {
+ echo "Usage: $0 [-a <array size>]" 1>&2
+ exit 1
+}
+
+while getopts "a:" o; do
+ case "$o" in
+ a) ARRAY_SIZE="${OPTARG}" ;;
+ *) usage ;;
+ esac
+done
+
+[ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)"
+mkdir -p "${OUTPUT}"
+
+# Run Test.
+info_msg "Running linpack with array size ${ARRAY_SIZE}..."
+detect_abi
+# shellcheck disable=SC2154
+( echo "${ARRAY_SIZE}"; echo "q" ) \
+ | ./bin/"${abi}"/linpack 2>&1 \
+ | tee "${TEST_LOG}"
+
+# Parse output.
+echo
+egrep "^ +[0-9]+ " "${TEST_LOG}" \
+ | awk -v array_size="${ARRAY_SIZE}" \
+ 'END{printf("linpack-%s pass %s flops\n", array_size, $NF)}' \
+ | tee -a "${RESULT_FILE}"
diff --git a/automated/linux/linpack/linpack.yaml b/automated/linux/linpack/linpack.yaml
new file mode 100644
index 0000000..e2e4446
--- /dev/null
+++ b/automated/linux/linpack/linpack.yaml
@@ -0,0 +1,31 @@
+metadata:
+ format: Lava-Test Test Definition 1.0
+ name: linpack
+ description: "Linpack benchmark calculates fLoating point operations per
+ second(FLOPS)."
+ maintainer:
+ - chase.qi@linaro.org
+ os:
+ - debian
+ - ubuntu
+ - fedora
+ - centos
+ scope:
+ - performance
+ devices:
+ - hi6220-hikey
+ - apq8016-sbc
+ - mustang
+ - moonshot
+ - thunderX
+ - d03
+ - d05
+
+params:
+ ARRAY_SIZE: "200"
+
+run:
+ steps:
+ - cd ./automated/linux/linpack/
+ - ./linpack.sh -a "${ARRAY_SIZE}"
+ - ../../utils/send-to-lava.sh ./output/result.txt