From e624e16690e57d1b725298edfa65aea5df5c9d7f Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Wed, 18 Dec 2013 17:16:08 +0100 Subject: [PATCH] crush: silence error messages in unit tests The error messages are intentional when error conditions are created. They will create false positive in the gitbuilder parser when the string error is found. The --debug-crush flag is detected to allow the caller to reset the verbosity level. Signed-off-by: Loic Dachary --- src/test/crush/TestCrushWrapper.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/crush/TestCrushWrapper.cc b/src/test/crush/TestCrushWrapper.cc index 9d121db2978..d936a6ca9f8 100644 --- a/src/test/crush/TestCrushWrapper.cc +++ b/src/test/crush/TestCrushWrapper.cc @@ -26,6 +26,7 @@ #include "common/ceph_argparse.h" #include "global/global_init.h" #include "global/global_context.h" +#include "include/Context.h" #include "crush/CrushWrapper.h" @@ -466,9 +467,10 @@ int main(int argc, char **argv) { vector args; argv_to_vec(argc, (const char **)argv, args); - global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0); + vector def_args; + def_args.push_back("--debug-crush=0"); + global_init(&def_args, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0); common_init_finish(g_ceph_context); - ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } -- 2.47.3