From: Sage Weil Date: Wed, 10 Jan 2018 18:24:50 +0000 (-0600) Subject: test: drop hackery for CEPH_LIB X-Git-Tag: wip-pdonnell-testing-20180317.202121~121^2~74 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d9a302932b788d9777fb6d80db2fc3b31a7a336b;p=ceph-ci.git test: drop hackery for CEPH_LIB Generic config code parses this now as part of global_init. Signed-off-by: Sage Weil --- diff --git a/src/test/compressor/test_compression.cc b/src/test/compressor/test_compression.cc index b7ab9f0f65f..913f318fc05 100644 --- a/src/test/compressor/test_compression.cc +++ b/src/test/compressor/test_compression.cc @@ -383,8 +383,6 @@ TEST(ZlibCompressor, zlib_isal_compatibility) TEST(CompressionPlugin, all) { - const char* env = getenv("CEPH_LIB"); - std::string directory(env ? env : "lib"); CompressorRef compressor; PluginRegistry *reg = g_ceph_context->get_plugin_registry(); EXPECT_TRUE(reg); diff --git a/src/test/erasure-code/TestErasureCodePlugin.cc b/src/test/erasure-code/TestErasureCodePlugin.cc index 6afdb964d74..8ba51ddfaa5 100644 --- a/src/test/erasure-code/TestErasureCodePlugin.cc +++ b/src/test/erasure-code/TestErasureCodePlugin.cc @@ -82,8 +82,7 @@ TEST_F(ErasureCodePluginRegistryTest, factory_mutex) { TEST_F(ErasureCodePluginRegistryTest, all) { ErasureCodeProfile profile; - const char* env = getenv("CEPH_LIB"); - string directory(env ? env : "lib"); + string directory = g_conf->get_val("erasure_code_dir"); ErasureCodeInterfaceRef erasure_code; ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance(); EXPECT_FALSE(erasure_code); diff --git a/src/test/erasure-code/TestErasureCodeShec_all.cc b/src/test/erasure-code/TestErasureCodeShec_all.cc index 63dfe285a43..b6950cbcceb 100644 --- a/src/test/erasure-code/TestErasureCodeShec_all.cc +++ b/src/test/erasure-code/TestErasureCodeShec_all.cc @@ -298,10 +298,6 @@ int main(int argc, char **argv) CODE_ENVIRONMENT_UTILITY, 0); common_init_finish(g_ceph_context); - const char* env = getenv("CEPH_LIB"); - string directory(env ? env : ".libs"); - g_conf->set_val_or_die("erasure_code_dir", directory); - ::testing::InitGoogleTest(&argc, argv); r = RUN_ALL_TESTS(); diff --git a/src/test/erasure-code/TestErasureCodeShec_arguments.cc b/src/test/erasure-code/TestErasureCodeShec_arguments.cc index 1f09b9c9ca7..dffe0aad336 100644 --- a/src/test/erasure-code/TestErasureCodeShec_arguments.cc +++ b/src/test/erasure-code/TestErasureCodeShec_arguments.cc @@ -399,10 +399,6 @@ int main(int argc, char **argv) CODE_ENVIRONMENT_UTILITY, 0); common_init_finish(g_ceph_context); - const char* env = getenv("CEPH_LIB"); - std::string directory(env ? env : "lib"); - g_conf->set_val_or_die("erasure_code_dir", directory); - ::testing::InitGoogleTest(&argc, argv); create_table_shec432(); diff --git a/src/test/erasure-code/ceph_erasure_code.cc b/src/test/erasure-code/ceph_erasure_code.cc index 993862cb55d..0c576717366 100644 --- a/src/test/erasure-code/ceph_erasure_code.cc +++ b/src/test/erasure-code/ceph_erasure_code.cc @@ -89,9 +89,6 @@ int ErasureCodeCommand::setup(int argc, char** argv) { CINIT_FLAG_NO_DEFAULT_CONFIG_FILE); common_init_finish(g_ceph_context); g_ceph_context->_conf->apply_changes(NULL); - const char* env = getenv("CEPH_LIB"); - string directory(env ? env : "lib"); - g_conf->set_val_or_die("erasure_code_dir", directory); if (vm.count("help")) { cout << desc << std::endl; diff --git a/src/test/erasure-code/ceph_erasure_code_non_regression.cc b/src/test/erasure-code/ceph_erasure_code_non_regression.cc index b9ae1ae2530..8e497196d03 100644 --- a/src/test/erasure-code/ceph_erasure_code_non_regression.cc +++ b/src/test/erasure-code/ceph_erasure_code_non_regression.cc @@ -96,9 +96,6 @@ int ErasureCodeNonRegression::setup(int argc, char** argv) { CINIT_FLAG_NO_DEFAULT_CONFIG_FILE); common_init_finish(g_ceph_context); g_ceph_context->_conf->apply_changes(NULL); - const char* env = getenv("CEPH_LIB"); - std::string libs_dir(env ? env : "lib"); - g_conf->set_val_or_die("erasure_code_dir", libs_dir); if (vm.count("help")) { cout << desc << std::endl; diff --git a/src/test/unit.cc b/src/test/unit.cc index bc7e7260f6b..53c58ea15c8 100644 --- a/src/test/unit.cc +++ b/src/test/unit.cc @@ -40,12 +40,6 @@ int main(int argc, char **argv) { CODE_ENVIRONMENT_UTILITY, 0); common_init_finish(g_ceph_context); - const char* env = getenv("CEPH_LIB"); - if (env) { - g_conf->set_val_or_die("erasure_code_dir", env); - g_conf->set_val_or_die("plugin_dir", env); - } - ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }