summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-02-06 11:49:05 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-02-06 13:32:59 +0000
commit050e4e2c929b136a68b8455496eb67f2f1172adb (patch)
treefcdb57280784b90690ee4d14052898ec33261bc8
parent475120c780a115a49a06276125bc728eb06b9b0d (diff)
downloadtest-definitions-pipe-050e4e2c929b136a68b8455496eb67f2f1172adb.tar.gz
automated: linux: support sysbench compiling on oe-rpb
Change-Id: Ibc1e125dc56c4a5b6b73da368b668bafc2c9fb97 Signed-off-by: Chase Qi <chase.qi@linaro.org>
-rwxr-xr-xautomated/linux/sysbench/sysbench.sh29
-rw-r--r--automated/linux/sysbench/sysbench.yaml7
2 files changed, 21 insertions, 15 deletions
diff --git a/automated/linux/sysbench/sysbench.sh b/automated/linux/sysbench/sysbench.sh
index 9aa420d..9b88969 100755
--- a/automated/linux/sysbench/sysbench.sh
+++ b/automated/linux/sysbench/sysbench.sh
@@ -18,19 +18,20 @@ SKIP_INSTALL="false"
# sysbench test parameters.
NUM_THREADS="1"
-TESTS="cpu memory threads mutex fileio oltp"
+# TESTS="cpu memory threads mutex fileio oltp"
+TESTS="cpu memory threads mutex fileio"
usage() {
echo "usage: $0 [-n <num-threads>] [-t <test>] [-s <true|false>] 1>&2"
exit 1
}
-while getopts "n:t:s:h" opt; do
+while getopts ":n:t:s:" opt; do
case "${opt}" in
n) NUM_THREADS="${OPTARG}" ;;
t) TESTS="${OPTARG}" ;;
s) SKIP_INSTALL="${OPTARG}" ;;
- h|*) usage ;;
+ *) usage ;;
esac
done
@@ -39,7 +40,11 @@ install_sysbench() {
cd sysbench
git checkout 0.4
./autogen.sh
- ./configure "$1"
+ if echo "${TESTS}" | grep "oltp"; then
+ ./configure
+ else
+ ./configure --without-mysql
+ fi
make install
cd ../
}
@@ -61,23 +66,23 @@ else
if echo "${TESTS}" | grep "oltp"; then
install_deps "libmysqlclient-dev mysql-server"
systemctl start mysql
- install_sysbench
- else
- install_sysbench "--without-mysql"
fi
+ install_sysbench
;;
fedora|centos)
install_deps "git gcc make automake libtool"
if echo "${TESTS}" | grep "oltp"; then
install_deps "mysql-devel mariadb-server mariadb"
systemctl start mariadb
- install_sysbench
- else
- install_sysbench "--without-mysql"
fi
+ install_sysbench
;;
- unknown)
- warn_msg "Unsupported distro: package install skipped"
+ oe-rpb)
+ # Assume all dependent packages are already installed.
+ install_sysbench
+ ;;
+ *)
+ warn_msg "Unsupported distro: ${dist}! Package installation skipped!"
;;
esac
fi
diff --git a/automated/linux/sysbench/sysbench.yaml b/automated/linux/sysbench/sysbench.yaml
index 453eb74..1bceee4 100644
--- a/automated/linux/sysbench/sysbench.yaml
+++ b/automated/linux/sysbench/sysbench.yaml
@@ -13,6 +13,7 @@ metadata:
- ubuntu
- fedora
- centos
+ - openembedded
scope:
- performance
environment:
@@ -27,10 +28,10 @@ metadata:
- d05
params:
- # "${TESTS}" could be one more of the following tests.
+ # "${TESTS}" could be one or more of the following tests.
+ # TESTS: cpu memory threads mutex fileio oltp
# TESTS: "oltp"
- # TESTS: "fileio oltp"
- TESTS: "cpu memory threads mutex fileio oltp"
+ TESTS: "cpu memory threads mutex fileio"
# Number of threads to use.
NUM_THREADS: "1"
SKIP_INSTALL: "false"