]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: silence error messages in unit tests 966/head
authorLoic Dachary <loic@dachary.org>
Wed, 18 Dec 2013 16:16:08 +0000 (17:16 +0100)
committerLoic Dachary <loic@dachary.org>
Wed, 18 Dec 2013 17:52:52 +0000 (18:52 +0100)
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 <loic@dachary.org>
src/test/crush/TestCrushWrapper.cc

index 9d121db2978852ad805ae53c7cbcfa77ff504841..d936a6ca9f8e032bb2b12cd4284a717c8d8cd2e1 100644 (file)
@@ -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<const char*> args;
   argv_to_vec(argc, (const char **)argv, args);
 
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
+  vector<const char*> 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();
 }