Generic config code parses this now as part of global_init.
Signed-off-by: Sage Weil <sage@redhat.com>
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);
TEST_F(ErasureCodePluginRegistryTest, all)
{
ErasureCodeProfile profile;
- const char* env = getenv("CEPH_LIB");
- string directory(env ? env : "lib");
+ string directory = g_conf->get_val<std::string>("erasure_code_dir");
ErasureCodeInterfaceRef erasure_code;
ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
EXPECT_FALSE(erasure_code);
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();
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();
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;
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;
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();
}