From f8d47223e2e67871d5155406af4c4cda1451f521 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 20 May 2018 16:52:53 +0800 Subject: [PATCH] qa/workunits/rados/test_envlibrados_for_rocksdb: use cmake not make * so we just rely on a single build system instead of two of them, the other place we use cmake is cmake/modules/BuildRockDB.cmake. * disable gflags when building rocksdb, it's optional and does not help in the sense of testing librados support. * disable prompts when installing on debian, to silence warnings like: debconf: unable to initialize frontend: Dialog * drop --force-yes option, as it is deprecated, and is replaced with --allow-downgrades, --allow-remove-essential, --allow-change-held-packages, but none of them apply in our case. Signed-off-by: Kefu Chai --- qa/workunits/rados/test_envlibrados_for_rocksdb.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/qa/workunits/rados/test_envlibrados_for_rocksdb.sh b/qa/workunits/rados/test_envlibrados_for_rocksdb.sh index b7bd1dd8296b6..05281cbb445dd 100755 --- a/qa/workunits/rados/test_envlibrados_for_rocksdb.sh +++ b/qa/workunits/rados/test_envlibrados_for_rocksdb.sh @@ -14,7 +14,7 @@ function install() { function install_one() { case $(lsb_release -si) in Ubuntu|Debian|Devuan) - sudo apt-get install -y --force-yes "$@" + sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y "$@" ;; CentOS|Fedora|RedHatEnterpriseServer) sudo yum install -y "$@" @@ -31,7 +31,7 @@ function install_one() { # Install required tools ############################################ echo "Install required tools" -install git automake +install git cmake CURRENT_PATH=`pwd` @@ -42,10 +42,10 @@ CURRENT_PATH=`pwd` # for rocksdb case $(lsb_release -si) in Ubuntu|Debian|Devuan) - install g++ libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev librados-dev + install g++ libsnappy-dev zlib1g-dev libbz2-dev librados-dev ;; CentOS|Fedora|RedHatEnterpriseServer) - install gcc-c++.x86_64 gflags-devel snappy-devel zlib zlib-devel bzip2 bzip2-devel librados2-devel.x86_64 + install gcc-c++.x86_64 snappy-devel zlib zlib-devel bzip2 bzip2-devel librados2-devel.x86_64 ;; *) echo "$(lsb_release -si) is unknown, $@ will have to be installed manually." @@ -73,7 +73,8 @@ git clone https://github.com/facebook/rocksdb.git --depth 1 # compile code cd rocksdb -make env_librados_test ROCKSDB_USE_LIBRADOS=1 DISABLE_WARNING_AS_ERROR=1 -j8 +mkdir build && cd build && cmake -DWITH_LIBRADOS=ON -DWITH_SNAPPY=ON -DWITH_GFLAGS=OFF -DFAIL_ON_WARNINGS=OFF .. +make rocksdb_env_librados_test -j8 echo "Copy ceph.conf" # prepare ceph.conf -- 2.39.5