summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2013-02-14 09:36:05 +0100
committerPatrick Ohly <patrick.ohly@intel.com>2013-02-26 12:03:43 +0100
commitcd5a3944cdd32fc71755ff36ce54efbe09993421 (patch)
tree0e3eceac50f8261502eb87cc4bc162dcccaa721b /test
parent179590135fae639d0e874dbaf7500389c6e9e3a7 (diff)
D-Bus server: reduce D-Bus log messages
Sending DEBUG messages via the LogOutput signal is expensive and often not necessary. Ideally LogOutput should only send data that someone is interested in. The problem is that the SyncEvolution D-Bus API has no way of specifying that and some clients, like dbus-monitor, would not be able to use it. Therefore this commit makes the default level of detail configurable when syncevo-dbus-server is started, via a separate --dbus-verbosity option. This gets applied to output generated from syncevo-dbus-server itself as well as output from sync sessions. test-dbus.py exposes that via a new TEST_DBUS_QUIET option. The default is to include DEBUG output. When TEST_DBUS_QUIET is set to a non-empty string, only ERROR and INFO messages are sent.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-dbus.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test-dbus.py b/test/test-dbus.py
index 17650c9d..6930f060 100755
--- a/test/test-dbus.py
+++ b/test/test-dbus.py
@@ -57,8 +57,11 @@ except ImportError:
DBusGMainLoop(set_as_default=True)
debugger = os.environ.get("TEST_DBUS_GDB", None) and "gdb" or ""
-server = "syncevo-dbus-server --no-syslog --stdout --verbosity=3".split()
-monitor = ["dbus-monitor"]
+# Verbosity must at least include INFO messages, the "ready to run" we
+# wait for is not printed otherwise. Default is DEBUG.
+level = os.environ.get("TEST_DBUS_QUIET", False) and 2 or 3
+server = ("syncevo-dbus-server --no-syslog --stdout --verbosity=%d --dbus-verbosity=%d" % (level, level)).split()
+
# primarily for XDG files, but also other temporary files
xdg_root = "temp-test-dbus"
configName = "dbus_unittest"