From: Loic Dachary Date: Wed, 18 Dec 2013 16:16:08 +0000 (+0100) Subject: crush: silence error messages in unit tests X-Git-Tag: v0.75~74^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F966%2Fhead;p=ceph.git 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 --- diff --git a/src/test/crush/TestCrushWrapper.cc b/src/test/crush/TestCrushWrapper.cc index 9d121db29788..d936a6ca9f8e 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(); }