]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rados/test_envlibrados_for_rocksdb: use cmake not make
authorKefu Chai <kchai@redhat.com>
Sun, 20 May 2018 08:52:53 +0000 (16:52 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 21 May 2018 05:28:23 +0000 (13:28 +0800)
* 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 <kchai@redhat.com>
qa/workunits/rados/test_envlibrados_for_rocksdb.sh

index b7bd1dd8296b6ffb01deb5629c28560bc36a5cb3..05281cbb445ddbccca0044ac283527f8f5ba90c0 100755 (executable)
@@ -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