]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: get_command_descriptions use cout instead of dout 747/head
authorLoic Dachary <loic@dachary.org>
Sat, 19 Oct 2013 16:57:47 +0000 (18:57 +0200)
committerLoic Dachary <loic@dachary.org>
Sat, 19 Oct 2013 16:57:47 +0000 (18:57 +0200)
Using dout instead of cout creates noise and makes it more difficult for
people trying to debug a failure in test_ceph_argparse.py.

The output of get_command_descriptions is modified to only contain
parseable information and the code parsing its output
test_ceph_argparse.py is removed.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/test/common/get_command_descriptions.cc
src/test/pybind/test_ceph_argparse.py

index aff5575b8c477b9ab377bfa92315a83f6f469f31..9f20102f705e54eb19df1b4de563f7d29fff8643 100644 (file)
@@ -24,9 +24,6 @@
 #include "mon/Monitor.h"
 #include "common/ceph_argparse.h"
 #include "global/global_init.h"
-#include "common/debug.h"
-
-#define dout_subsys ceph_subsys_mon
 
 static void usage(ostream &out)
 {
@@ -51,7 +48,7 @@ static void json_print(const MonCommand *mon_commands, int size)
   get_command_descriptions(mon_commands, size, f, &rdata);
   delete f;
   string data(rdata.c_str(), rdata.length());
-  dout(0) << data << dendl;
+  cout << data << std::endl;
 }
 
 static void all()
index 540f690472b028e50ab007aeb76c9188e0a725f2..fd680e854e80a9e2548ad6a9333c69a40b790f6f 100755 (executable)
@@ -24,9 +24,7 @@ import re
 import json
 
 def get_command_descriptions(what):
-    buffer = os.popen("./get_command_descriptions " + "--" + what
-                                         + " 2>&1 | grep cmd000").read()
-    return re.sub(r'^.*?(\{.*\})', '\g<1>', buffer)
+    return os.popen("./get_command_descriptions " + "--" + what).read()
 
 def test_parse_json_funcsigs():
     commands = get_command_descriptions("all")