]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | #!/usr/bin/env bash |
2 | set -ex | |
7c673cae FG |
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 | ||
9f95a23c | 14 | export PYTHONPATH="$CEPH_SRC/pybind:$CEPH_SRC/test/pybind:$CYTHON_MODULES_DIR/lib.3" |
7c673cae FG |
15 | |
16 | recreate_pool() { | |
17 | POOL_NAME=$1 | |
18 | PG_NUM=100 | |
19 | ceph osd pool delete $POOL_NAME $POOL_NAME --yes-i-really-really-mean-it | |
20 | ceph osd pool create $POOL_NAME $PG_NUM | |
9f95a23c | 21 | rbd pool init $POOL_NAME |
7c673cae FG |
22 | } |
23 | ||
24 | run_cli_tests() { | |
25 | recreate_pool rbd | |
26 | $CEPH_SRC/../qa/workunits/rbd/import_export.sh | |
27 | recreate_pool rbd | |
28 | $CEPH_SRC/../qa/workunits/rbd/cli_generic.sh | |
29 | recreate_pool rbd | |
30 | $CEPH_SRC/../qa/workunits/rbd/journal.sh | |
f67539c2 TL |
31 | recreate_pool rbd |
32 | $CEPH_SRC/../qa/workunits/rbd/luks-encryption.sh | |
7c673cae FG |
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 | |
9f95a23c | 47 | python3 -m nose -v test_rbd -e '.*many_snaps' |
7c673cae FG |
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 |