Skip to content

Commit

Permalink
qa/workunits/rados/test_envlibrados_for_rocksdb: use cmake not make
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
tchaikov committed May 21, 2018
1 parent 63a3562 commit f8d4722
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions qa/workunits/rados/test_envlibrados_for_rocksdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand All @@ -31,7 +31,7 @@ function install_one() {
# Install required tools
############################################
echo "Install required tools"
install git automake
install git cmake

CURRENT_PATH=`pwd`

Expand All @@ -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."
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f8d4722

Please sign in to comment.