From 050e4e2c929b136a68b8455496eb67f2f1172adb Mon Sep 17 00:00:00 2001 From: Chase Qi Date: Mon, 6 Feb 2017 11:49:05 +0800 Subject: automated: linux: support sysbench compiling on oe-rpb Change-Id: Ibc1e125dc56c4a5b6b73da368b668bafc2c9fb97 Signed-off-by: Chase Qi --- automated/linux/sysbench/sysbench.sh | 29 +++++++++++++++++------------ automated/linux/sysbench/sysbench.yaml | 7 ++++--- 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 ] [-t ] [-s ] 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" -- cgit v1.2.3