mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-06 15:08:01 +02:00
monitor test: Log the messages that we monitored
This is helpful while debugging test failures.
Helps: dbus/dbus#457
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 8ee5d3e044)
This commit is contained in:
parent
e8bdc729fb
commit
3a1b1e9a40
1 changed files with 7 additions and 0 deletions
|
|
@ -196,6 +196,10 @@ _log_message (DBusMessage *m,
|
|||
not_null (dbus_message_get_signature (m)));
|
||||
g_test_message ("\terror name: %s",
|
||||
not_null (dbus_message_get_error_name (m)));
|
||||
g_test_message ("\tserial number: %u",
|
||||
dbus_message_get_serial (m));
|
||||
g_test_message ("\tin reply to: %u",
|
||||
dbus_message_get_reply_serial (m));
|
||||
|
||||
if (strcmp ("s", dbus_message_get_signature (m)) == 0)
|
||||
{
|
||||
|
|
@ -339,6 +343,9 @@ monitor_filter (DBusConnection *connection,
|
|||
{
|
||||
Fixture *f = user_data;
|
||||
|
||||
g_test_message ("Monitor received message:");
|
||||
log_message (message);
|
||||
|
||||
g_assert_cmpstr (dbus_message_get_interface (message), !=,
|
||||
"com.example.Tedious");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue