summaryrefslogtreecommitdiff
path: root/glib/gtestutils.c
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2022-12-16 17:28:34 -0500
committerMarco Trevisan (TreviƱo) <mail@3v1n0.net>2023-01-17 21:08:49 +0100
commitc00135ec736eae942b97741f00f597546936976b (patch)
tree9572ac977e95aa6b545fc3a56913d0b8bcf25bd1 /glib/gtestutils.c
parentf893df4b7d52cce6c2abcd485a8cfc15320835b7 (diff)
downloadglib-c00135ec736eae942b97741f00f597546936976b.tar.gz
gtestutils: Do not use default log handler when using TAP
Only use g_test_log() because it will prepend `#` to log messages when using TAP protocol. Meson >=1.0 rightfully prints a warning when using TAP protocol and stdout contains non-comment unknown TAP command.
Diffstat (limited to 'glib/gtestutils.c')
-rw-r--r--glib/gtestutils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index 4df2394f7..552ee336d 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -3295,9 +3295,10 @@ gtest_default_log_handler (const gchar *log_domain,
msg = g_strjoinv ("", (gchar**) strv);
g_test_log (fatal ? G_TEST_LOG_ERROR : G_TEST_LOG_MESSAGE, msg, NULL, 0, NULL);
- g_log_default_handler (log_domain, log_level, message, unused_data);
-
g_free (msg);
+
+ if (!test_tap_log)
+ g_log_default_handler (log_domain, log_level, message, unused_data);
}
void