diff options
author | Chase Qi <chase.qi@linaro.org> | 2017-02-06 11:49:05 +0800 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2017-02-06 13:32:59 +0000 |
commit | 050e4e2c929b136a68b8455496eb67f2f1172adb (patch) | |
tree | fcdb57280784b90690ee4d14052898ec33261bc8 /automated/linux/sysbench/sysbench.sh | |
parent | 475120c780a115a49a06276125bc728eb06b9b0d (diff) |
automated: linux: support sysbench compiling on oe-rpb
Change-Id: Ibc1e125dc56c4a5b6b73da368b668bafc2c9fb97
Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated/linux/sysbench/sysbench.sh')
-rwxr-xr-x | automated/linux/sysbench/sysbench.sh | 29 |
1 files changed, 17 insertions, 12 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 |