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