this test wasn't creating the lib/compressor subdirectory, so it
depended on test_compressor_plugin_zlib or test_compressor_plugin_snappy
being run first
added the same dirty hack to copy libceph_snappy.so into lib/compressor,
and added a dependency on ceph_snappy to make sure it's built
Signed-off-by: Casey Bodley <cbodley@redhat.com>
)
add_ceph_unittest(unittest_async_compressor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_async_compressor)
target_link_libraries(unittest_async_compressor global)
+add_dependencies(unittest_async_compressor ceph_snappy)
# unittest_interval_set
add_executable(unittest_interval_set EXCLUDE_FROM_ALL
const char* env = getenv("CEPH_LIB");
string directory(env ? env : "lib");
+
+ // copy libceph_snappy.so into $plugin_dir/compressor for PluginRegistry
+ // TODO: just build the compressor plugins in this subdir
+ string mkdir_compressor = "mkdir -p " + directory + "/compressor";
+ int r = system(mkdir_compressor.c_str());
+ (void)r;
+
+ string cp_libceph_snappy = "cp " + directory + "/libceph_snappy.so* " + directory + "/compressor/";
+ r = system(cp_libceph_snappy.c_str());
+ (void)r;
+
g_conf->set_val("plugin_dir", directory, false, false);
::testing::InitGoogleTest(&argc, argv);