]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/run-rbd-tests
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / test / run-rbd-tests
1 #!/usr/bin/env bash
2 set -ex
3
4 # this should be run from the src directory in the ceph.git
5
6 source $(dirname $0)/detect-build-env-vars.sh
7 CEPH_SRC=$CEPH_ROOT/src
8 if [ -e CMakeCache.txt ]; then
9 CYTHON_MODULES_DIR=$CEPH_LIB/cython_modules
10 else
11 CYTHON_MODULES_DIR=$CEPH_SRC/build
12 fi
13
14 export PYTHONPATH="$CEPH_SRC/pybind:$CEPH_SRC/test/pybind"
15 for x in $CYTHON_MODULES_DIR/lib* ; do
16 PYTHONPATH="${PYTHONPATH}:${x}"
17 done
18
19 recreate_pool() {
20 POOL_NAME=$1
21 PG_NUM=100
22 ceph osd pool delete $POOL_NAME $POOL_NAME --yes-i-really-really-mean-it
23 ceph osd pool create $POOL_NAME $PG_NUM
24 }
25
26 run_cli_tests() {
27 recreate_pool rbd
28 $CEPH_SRC/../qa/workunits/rbd/import_export.sh
29 recreate_pool rbd
30 $CEPH_SRC/../qa/workunits/rbd/cli_generic.sh
31 recreate_pool rbd
32 $CEPH_SRC/../qa/workunits/rbd/journal.sh
33 }
34
35 # tests that do not depend on image format / features
36 run_generic_tests() {
37 $CEPH_SRC/../qa/workunits/rbd/verify_pool.sh
38
39 recreate_pool rbd
40 $CEPH_SRC/../qa/workunits/rbd/journal.sh
41 recreate_pool rbd
42 $CEPH_SRC/../qa/workunits/rbd/test_admin_socket.sh
43 }
44
45 run_api_tests() {
46 # skip many_snaps since it takes several minutes
47 nosetests -v test_rbd -e '.*many_snaps'
48 # ceph_test_librbd creates its own pools
49 ceph_test_librbd
50 }
51
52 ceph_test_cls_rbd
53 run_generic_tests
54 run_api_tests
55 run_cli_tests
56
57 export RBD_CREATE_ARGS="--image-format 2"
58 run_cli_tests
59
60 for i in 0 1 61 109
61 do
62 export RBD_FEATURES=$i
63 run_api_tests
64 done
65
66 echo OK