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 <ivancich@redhat.com>
This commit is contained in:
J. Eric Ivancich 2017-05-19 16:54:33 -04:00
parent 963a803d20
commit b3e677ab1f
3 changed files with 11 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -886,17 +886,19 @@ add_subdirectory(compressor)
add_subdirectory(tools)
# dmClock
# dmClock (after gmock)
add_subdirectory(dmclock) # after gmock
add_dependencies(tests dmclock-tests dmclock-data-struct-tests)
add_subdirectory(dmclock/src)
if(WITH_TESTS)
install(PROGRAMS
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dmclock-tests
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dmclock-data-struct-tests
DESTINATION bin)
endif(WITH_TESTS)
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)