From: J. Eric Ivancich Date: Fri, 19 May 2017 20:54:33 +0000 (-0400) Subject: osd/dmclock/testing: reorganize testing, building now optional X-Git-Tag: v12.1.0~258^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F15375%2Fhead;p=ceph.git osd/dmclock/testing: reorganize testing, building now optional Modify cmake files to take advantage or re-organization of dmclock's cmake set-up, specifically not having dmclock's cmake files call add_test. Remove dmclock tests from being dependencies on ceph's "test" target. Make change so dmclock tests are not built unless WITH_TESTS and WITH_DMCLOCK_TESTS are both set. This is so openSUSE Leap will build correctly. Signed-off-by: J. Eric Ivancich --- diff --git a/ceph.spec.in b/ceph.spec.in index 9fc84f44b41e..e415e2b442dd 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1686,8 +1686,6 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1 %{_bindir}/ceph-osdomap-tool %{_bindir}/ceph-kvstore-tool %{_bindir}/ceph-debugpack -%{_bindir}/dmclock-tests -%{_bindir}/dmclock-data-struct-tests %{_mandir}/man8/ceph-debugpack.8* %dir %{_libdir}/ceph %{_libdir}/ceph/ceph-monstore-update-crush.sh diff --git a/debian/ceph-test.install b/debian/ceph-test.install index 4fdf179e3045..15b04664eaab 100644 --- a/debian/ceph-test.install +++ b/debian/ceph-test.install @@ -26,7 +26,5 @@ usr/bin/ceph_xattr_bench usr/bin/ceph-monstore-tool usr/bin/ceph-osdomap-tool usr/bin/ceph-kvstore-tool -usr/bin/dmclock-tests -usr/bin/dmclock-data-struct-tests usr/share/java/libcephfs-test.jar usr/lib/ceph/ceph-monstore-update-crush.sh diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3483a08a39d8..37462a162ee7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -886,17 +886,19 @@ add_subdirectory(compressor) add_subdirectory(tools) -# dmClock - -add_subdirectory(dmclock) # after gmock -add_dependencies(tests dmclock-tests dmclock-data-struct-tests) - -if(WITH_TESTS) - install(PROGRAMS - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dmclock-tests - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dmclock-data-struct-tests - DESTINATION bin) -endif(WITH_TESTS) +# dmClock (after gmock) + +add_subdirectory(dmclock/src) + +option(WITH_DMCLOCK_TESTS + "enable the build of dmclock-tests and dmclock-data-struct tests binaries" + OFF) +if(WITH_TESTS AND WITH_DMCLOCK_TESTS) + # note: add_test is not being called, so dmclock tests aren't part + # of ceph tests + add_subdirectory(dmclock/test) + add_subdirectory(dmclock/support/test) +endif(WITH_TESTS AND WITH_DMCLOCK_TESTS) if(HAVE_INTEL) add_subdirectory(crypto/isa-l)