2017-07-20 22:26:42 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -ex
|
2017-05-05 19:19:05 +00:00
|
|
|
|
|
|
|
# run s3-tests from current directory. assume working
|
|
|
|
# ceph environment (radosgw-admin in path) and rgw on localhost:8000
|
|
|
|
# (the vstart default).
|
|
|
|
|
|
|
|
branch=$1
|
|
|
|
[ -z "$1" ] && branch=master
|
|
|
|
port=$2
|
|
|
|
[ -z "$2" ] && port=8000 # this is vstart's default
|
|
|
|
|
|
|
|
##
|
|
|
|
|
2019-08-21 06:27:42 +00:00
|
|
|
[ -z "$BUILD_DIR" ] && BUILD_DIR=build
|
|
|
|
|
2017-05-19 15:25:20 +00:00
|
|
|
if [ -e CMakeCache.txt ]; then
|
|
|
|
BIN_PATH=$PWD/bin
|
2019-08-21 06:27:42 +00:00
|
|
|
elif [ -e $root_path/../${BUILD_DIR}/CMakeCache.txt ]; then
|
|
|
|
cd $root_path/../${BUILD_DIR}
|
2017-05-19 15:25:20 +00:00
|
|
|
BIN_PATH=$PWD/bin
|
|
|
|
fi
|
|
|
|
PATH=$PATH:$BIN_PATH
|
|
|
|
|
2017-05-05 19:19:05 +00:00
|
|
|
dir=tmp.s3-tests.$$
|
|
|
|
|
|
|
|
# clone and bootstrap
|
|
|
|
mkdir $dir
|
|
|
|
cd $dir
|
|
|
|
git clone https://github.com/ceph/s3-tests
|
|
|
|
cd s3-tests
|
|
|
|
git checkout ceph-$branch
|
2019-12-13 14:47:12 +00:00
|
|
|
VIRTUALENV_PYTHON=/usr/bin/python3 ./bootstrap
|
2017-05-05 19:19:05 +00:00
|
|
|
|
2019-12-17 18:57:57 +00:00
|
|
|
S3TEST_CONF=s3tests.conf.SAMPLE virtualenv/bin/python -m nose -a '!fails_on_rgw,!lifecycle_expiration,!fails_strict_rfc2616' -v
|
2017-05-05 19:19:05 +00:00
|
|
|
|
2019-07-10 15:39:45 +00:00
|
|
|
cd ../..
|
2017-05-05 19:19:05 +00:00
|
|
|
rm -rf $dir
|
|
|
|
|
|
|
|
echo OK.
|
|
|
|
|