From f893df4b7d52cce6c2abcd485a8cfc15320835b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 17 Dec 2022 06:30:09 +0100 Subject: [PATCH] gtestutils: Use TAP 13 comments syntax for subtests Sadly meson 60 doesn't support parsing TAP 14 subtests properly, so it would fail. So temporary go back to the previous logic in a simple way so that this commit can be reverted quickly when we can use a newer meson version. --- glib/gtestutils.c | 6 ++++-- glib/tests/testing.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/glib/gtestutils.c b/glib/gtestutils.c index 7ab52a7f1..4df2394f7 100644 --- a/glib/gtestutils.c +++ b/glib/gtestutils.c @@ -58,7 +58,9 @@ #include "glib-private.h" #include "gutilsprivate.h" -#define TAP_SUBTEST_PREFIX " " /* a 4-space indented line */ +/* FIXME: Remove '#' prefix when we'll depend on a meson version supporting TAP 14 + * See https://gitlab.gnome.org/GNOME/glib/-/issues/2885 */ +#define TAP_SUBTEST_PREFIX "# " /* a 4-space indented line */ /** * SECTION:testing @@ -1007,7 +1009,7 @@ g_test_log (GTestLogType lbit, if (test_tap_log) { if (!is_subtest) - g_print ("TAP version 14\n"); + g_print ("TAP version 13\n"); else g_print ("# Subtest: %s\n", test_argv0); diff --git a/glib/tests/testing.c b/glib/tests/testing.c index 658521083..dbbde1733 100644 --- a/glib/tests/testing.c +++ b/glib/tests/testing.c @@ -35,8 +35,8 @@ #include #include -#define TAP_VERSION G_STRINGIFY (14) -#define TAP_SUBTEST_PREFIX " " +#define TAP_VERSION G_STRINGIFY (13) +#define TAP_SUBTEST_PREFIX "# " /* test assertion variants */ static void