diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index be2d1d1df0f..fc872f1a489 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1041,6 +1041,7 @@ if(${WITH_RBD}) tools/rbd_mirror/image_sync/ImageCopyRequest.cc tools/rbd_mirror/image_sync/ObjectCopyRequest.cc tools/rbd_mirror/image_sync/SnapshotCopyRequest.cc + tools/rbd_mirror/image_sync/SnapshotCreateRequest.cc tools/rbd_mirror/image_sync/SyncPointCreateRequest.cc tools/rbd_mirror/image_sync/SyncPointPruneRequest.cc) add_library(rbd_mirror_internal STATIC ${rbd_mirror_internal}) diff --git a/src/test/journal/CMakeLists.txt b/src/test/journal/CMakeLists.txt index 0fc9fe83fec..ca2d8519576 100644 --- a/src/test/journal/CMakeLists.txt +++ b/src/test/journal/CMakeLists.txt @@ -1,3 +1,10 @@ +set(journal_test + mock/MockJournaler.cc + ) +add_library(journal_test STATIC ${journal_test}) +set_target_properties(journal_test PROPERTIES COMPILE_FLAGS + ${UNITTEST_CXX_FLAGS}) + # unittest_journal set(unittest_journal_srcs test_main.cc diff --git a/src/test/librbd/CMakeLists.txt b/src/test/librbd/CMakeLists.txt index 8e91aa738ab..e51a96c1a52 100644 --- a/src/test/librbd/CMakeLists.txt +++ b/src/test/librbd/CMakeLists.txt @@ -39,6 +39,8 @@ set(unittest_librbd_srcs operation/test_mock_SnapshotRemoveRequest.cc operation/test_mock_SnapshotRollbackRequest.cc operation/test_mock_SnapshotUnprotectRequest.cc + mock/MockImageCtx.cc + mock/MockJournal.cc ) add_executable(unittest_librbd EXCLUDE_FROM_ALL ${unittest_librbd_srcs} @@ -55,6 +57,7 @@ target_link_libraries(unittest_librbd cls_lock cls_lock_client journal + journal_test cls_journal cls_journal_client rados_test_stub diff --git a/src/test/rbd_mirror/CMakeLists.txt b/src/test/rbd_mirror/CMakeLists.txt index a6c2c3a9ad6..dd984e47a11 100644 --- a/src/test/rbd_mirror/CMakeLists.txt +++ b/src/test/rbd_mirror/CMakeLists.txt @@ -19,7 +19,6 @@ add_executable(unittest_rbd_mirror EXCLUDE_FROM_ALL image_sync/test_mock_SnapshotCopyRequest.cc image_sync/test_mock_SyncPointCreateRequest.cc image_sync/test_mock_SyncPointPruneRequest.cc - mock/MockJournaler.cc ${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc ) add_ceph_unittest(unittest_rbd_mirror ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rbd_mirror) @@ -32,6 +31,7 @@ target_link_libraries(unittest_rbd_mirror rbd_internal rbd_api journal + journal_test cls_rbd_client cls_lock_client cls_journal_client