diff options
author | Ali Maredia <amaredia@redhat.com> | 2016-04-26 23:54:33 +0200 |
---|---|---|
committer | Ali Maredia <amaredia@redhat.com> | 2016-05-02 16:19:32 +0200 |
commit | e863724e0306987becc7fb8982425d28510453ad (patch) | |
tree | b9b76d245e2a7b1b033cec0fb02c259470e39d39 /src/test/compressor | |
parent | cmake: add test_pool_quota.sh to (diff) | |
download | ceph-e863724e0306987becc7fb8982425d28510453ad.tar.xz ceph-e863724e0306987becc7fb8982425d28510453ad.zip |
cmake: CEPH_LIB defaults to .libs in cpp unit tests
This makes it possible to run applicable unit tests
without setting environment varibles after building
with autotools.
This will be reverted once autotools is deprecated.
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Diffstat (limited to 'src/test/compressor')
5 files changed, 6 insertions, 6 deletions
diff --git a/src/test/compressor/test_compression_plugin.cc b/src/test/compressor/test_compression_plugin.cc index 45cffafaf31..51b60a10758 100644 --- a/src/test/compressor/test_compression_plugin.cc +++ b/src/test/compressor/test_compression_plugin.cc @@ -28,7 +28,7 @@ TEST(CompressionPlugin, all) { const char* env = getenv("CEPH_LIB"); - std::string directory(env ? env : "lib"); + std::string directory(env ? env : ".libs"); CompressorRef compressor; PluginRegistry *reg = g_ceph_context->get_plugin_registry(); EXPECT_TRUE(reg); @@ -55,7 +55,7 @@ int main(int argc, char **argv) { common_init_finish(g_ceph_context); const char* env = getenv("CEPH_LIB"); - string directory(env ? env : "lib"); + string directory(env ? env : ".libs"); string mkdir_compressor = "mkdir -p " + directory + "/compressor"; int r = system(mkdir_compressor.c_str()); (void)r; diff --git a/src/test/compressor/test_compression_plugin_snappy.cc b/src/test/compressor/test_compression_plugin_snappy.cc index 9e733f4396f..b67354b24f3 100644 --- a/src/test/compressor/test_compression_plugin_snappy.cc +++ b/src/test/compressor/test_compression_plugin_snappy.cc @@ -39,7 +39,7 @@ int main(int argc, char **argv) { common_init_finish(g_ceph_context); const char* env = getenv("CEPH_LIB"); - std::string directory(env ? env : "lib"); + std::string directory(env ? env : ".libs"); string mkdir_compressor = "mkdir -p " + directory + "/compressor"; int r = system(mkdir_compressor.c_str()); (void)r; diff --git a/src/test/compressor/test_compression_plugin_zlib.cc b/src/test/compressor/test_compression_plugin_zlib.cc index 5af5d14aa3c..af87fa4c84d 100644 --- a/src/test/compressor/test_compression_plugin_zlib.cc +++ b/src/test/compressor/test_compression_plugin_zlib.cc @@ -38,7 +38,7 @@ int main(int argc, char **argv) { common_init_finish(g_ceph_context); const char* env = getenv("CEPH_LIB"); - string directory(env ? env : "lib"); + string directory(env ? env : ".libs"); string mkdir_compressor = "mkdir -p " + directory + "/compressor"; int r = system(mkdir_compressor.c_str()); (void)r; diff --git a/src/test/compressor/test_compression_snappy.cc b/src/test/compressor/test_compression_snappy.cc index bbd315cf308..71955cc6030 100644 --- a/src/test/compressor/test_compression_snappy.cc +++ b/src/test/compressor/test_compression_snappy.cc @@ -78,7 +78,7 @@ int main(int argc, char **argv) { common_init_finish(g_ceph_context); const char* env = getenv("CEPH_LIB"); - string directory(env ? env : "lib"); + string directory(env ? env : ".libs"); g_conf->set_val("plugin_dir", directory, false, false); ::testing::InitGoogleTest(&argc, argv); diff --git a/src/test/compressor/test_compression_zlib.cc b/src/test/compressor/test_compression_zlib.cc index 6ba64452f9b..49cf720974f 100644 --- a/src/test/compressor/test_compression_zlib.cc +++ b/src/test/compressor/test_compression_zlib.cc @@ -70,7 +70,7 @@ int main(int argc, char **argv) { common_init_finish(g_ceph_context); const char* env = getenv("CEPH_LIB"); - string directory(env ? env : "lib"); + string directory(env ? env : ".libs"); g_conf->set_val("compression_dir", directory, false, false); ::testing::InitGoogleTest(&argc, argv); |