summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2017-04-21 14:27:14 +0530
committerNaresh Kamboju <naresh.kamboju@linaro.org>2017-04-21 14:29:14 +0530
commit739cce6ab69d13c73a8f5dd924b2d3f84debb68f (patch)
tree5634b281d5e3f0e69c15a43f63661deb7fb28a92
parent05b2d384740be747d3de6745fa7ace160d1f26c4 (diff)
automated: linux: Adding lapack test suite
LAPACK is a library of Fortran subroutines for solving the most commonly occurring problems in numerical linear algebra. Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rwxr-xr-xautomated/linux/lapack/lapack.sh62
-rw-r--r--automated/linux/lapack/lapack.yaml31
2 files changed, 93 insertions, 0 deletions
diff --git a/automated/linux/lapack/lapack.sh b/automated/linux/lapack/lapack.sh
new file mode 100755
index 0000000..f4f5965
--- /dev/null
+++ b/automated/linux/lapack/lapack.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# shellcheck disable=SC1091
+. ../../lib/sh-test-lib
+
+OUTPUT="$(pwd)/output"
+RESULT_FILE="${OUTPUT}/result.txt"
+RESULT_LOG="${OUTPUT}/result_log.txt"
+
+usage() {
+ echo "Usage: $0 [-s <true>]" 1>&2
+ exit 1
+}
+
+while getopts "s:" o; do
+ case "$o" in
+ s) SKIP_INSTALL="${OPTARG}" ;;
+ *) usage ;;
+ esac
+done
+
+lapack_build_test() {
+ git clone https://github.com/Reference-LAPACK/lapack
+ # shellcheck disable=SC2164
+ cd lapack
+ cp make.inc.example make.inc
+ ulimit -s 100000
+ make blaslib
+ make
+}
+
+install() {
+ dist_name
+ # shellcheck disable=SC2154
+ case "${dist}" in
+ debian|ubuntu)
+ pkgs="binutils gcc make python sed tar wget gfortran"
+ install_deps "${pkgs}" "${SKIP_INSTALL}"
+ ;;
+ fedora|centos)
+ pkgs="binutils gcc glibc-static make python sed tar wget gfortran"
+ install_deps "${pkgs}" "${SKIP_INSTALL}"
+ ;;
+ esac
+}
+
+# Test run.
+! check_root && error_msg "This script must be run as root"
+create_out_dir "${OUTPUT}"
+# shellcheck disable=SC2164
+cd "${OUTPUT}"
+
+info_msg "About to run lapack test..."
+info_msg "Output directory: ${OUTPUT}"
+
+# Install packages
+install
+
+# Setup lapack mount point
+lapack_setup
+# Build lapack tests
+lapack_build_test
diff --git a/automated/linux/lapack/lapack.yaml b/automated/linux/lapack/lapack.yaml
new file mode 100644
index 0000000..83c8a3a
--- /dev/null
+++ b/automated/linux/lapack/lapack.yaml
@@ -0,0 +1,31 @@
+metadata:
+ name: lapack
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Build and run lapack tests"
+
+ maintainer:
+ - naresh.kamboju@linaro.org
+ os:
+ - debian
+ - ubuntu
+ - centos
+ - fedora
+ scope:
+ - functional
+ devices:
+ - arndale
+ - mustang
+ - overdrive
+ - d05
+ - d03
+ - hi6220-hikey
+ - apq8016-sbc
+
+params:
+ SKIP_INSTALL: "False"
+
+run:
+ steps:
+ - cd ./automated/linux/lapack/
+ - ./lapack.sh -s "${SKIP_INSTALL}"
+ - ../../utils/send-to-lava.sh ./output/result.txt