]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson: do not use unit.cc as the driver of unittest_seastar_denc 23937/head
authorKefu Chai <kchai@redhat.com>
Wed, 5 Sep 2018 11:06:40 +0000 (19:06 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 5 Sep 2018 11:31:49 +0000 (19:31 +0800)
as unit.cc initializes the CephContext and all of Ceph's infratructure,
which is not necessary for the denc test. also, seastar's builtin allocator
only pre-allocates 32 << 20 bytes. it's enough for the denc test, but
not necessarily enough for create CephContext and its friends. an option is
to use seastar's app template to initialize the memory allocator properly.
another option is to avoid initializing CephContext in this test.

the latter is simpler.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/crimson/CMakeLists.txt

index 618b94236a43e02fb68781575326ec4a426b340e..4e8c789ea78b3e4eadcac806700fce6a2d1cff5f 100644 (file)
@@ -4,10 +4,9 @@ add_ceph_unittest(unittest_seastar_buffer)
 target_link_libraries(unittest_seastar_buffer ceph-common crimson)
 
 add_executable(unittest_seastar_denc
-  test_denc.cc
-  $<TARGET_OBJECTS:unit-main>)
+  test_denc.cc)
 add_ceph_unittest(unittest_seastar_denc)
-target_link_libraries(unittest_seastar_denc ceph-common global crimson)
+target_link_libraries(unittest_seastar_denc crimson GTest::Main)
 
 add_executable(unittest_seastar_messenger test_messenger.cc)
 add_ceph_unittest(unittest_seastar_messenger)