]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: exercise all RBD features during unit test 4235/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 31 Mar 2015 18:28:54 +0000 (14:28 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 31 Mar 2015 18:34:05 +0000 (14:34 -0400)
The librbd unit tests currently only test the old image format. Ensure
the new format and its possible features are also tested.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/Makefile-client.am
src/test/run-rbd-unit-tests.sh [new file with mode: 0755]

index d496a03beb5c6a6fcb3027fa6bd115261be7d96a..8c58b38a29b348f315803174d2b1daa6938badbe 100644 (file)
@@ -291,7 +291,8 @@ unittest_librbd_LDADD = \
        librados_test_stub.la librados_internal.la \
        $(LIBOSDC) $(UNITTEST_LDADD) \
        $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
-check_PROGRAMS += unittest_librbd
+noinst_PROGRAMS += unittest_librbd
+check_SCRIPTS += test/run-rbd-unit-tests.sh
 
 ceph_test_librbd_SOURCES =
 nodist_EXTRA_ceph_test_librbd_SOURCES = dummy.cc
diff --git a/src/test/run-rbd-unit-tests.sh b/src/test/run-rbd-unit-tests.sh
new file mode 100755 (executable)
index 0000000..a8935dd
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash -ex
+
+# this should be run from the src directory in the ceph.git
+
+CEPH_SRC=$(pwd)
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CEPH_SRC/.libs"
+PATH="$CEPH_SRC:$PATH"
+
+unittest_librbd
+for i in 0 1 5 13
+do
+    RBD_FEATURES=$i unittest_librbd
+done
+
+echo OK