From b3e677ab1f691d963af5ed47dcb1810e4a32cc4f Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Fri, 19 May 2017 16:54:33 -0400 Subject: [PATCH] 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 --- ceph.spec.in | 2 -- debian/ceph-test.install | 2 -- src/CMakeLists.txt | 24 +++++++++++++----------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 9fc84f44b41..e415e2b442d 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 4fdf179e304..15b04664eaa 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 3483a08a39d..37462a162ee 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) -- 2.39.5