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.
This commit is contained in:
Marco Trevisan (Treviño) 2022-12-17 06:30:09 +01:00
parent 28b73434be
commit f893df4b7d
2 changed files with 6 additions and 4 deletions

View File

@ -58,7 +58,9 @@
#include "glib-private.h" #include "glib-private.h"
#include "gutilsprivate.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 * SECTION:testing
@ -1007,7 +1009,7 @@ g_test_log (GTestLogType lbit,
if (test_tap_log) if (test_tap_log)
{ {
if (!is_subtest) if (!is_subtest)
g_print ("TAP version 14\n"); g_print ("TAP version 13\n");
else else
g_print ("# Subtest: %s\n", test_argv0); g_print ("# Subtest: %s\n", test_argv0);

View File

@ -35,8 +35,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define TAP_VERSION G_STRINGIFY (14) #define TAP_VERSION G_STRINGIFY (13)
#define TAP_SUBTEST_PREFIX " " #define TAP_SUBTEST_PREFIX "# "
/* test assertion variants */ /* test assertion variants */
static void static void