diff options
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rw-r--r-- | tests/forms-test.c | 4 | ||||
-rw-r--r-- | tests/meson.build | 8 | ||||
-rw-r--r-- | tests/server-test.c | 4 | ||||
-rw-r--r-- | tests/test-utils.c | 7 |
5 files changed, 20 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a47b74ba..839cb880 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,8 +18,8 @@ fedora-test: script: - cp .gitlab-ci/lcovrc ~/.lcovrc - meson _build -Db_coverage=true -Dauto_features=enabled - - ninja -C _build - - ninja -C _build test + - meson compile -C _build + - meson test -C _build --verbose - ninja -C _build coverage-html artifacts: reports: diff --git a/tests/forms-test.c b/tests/forms-test.c index 1c9af9ea..8dbdbe54 100644 --- a/tests/forms-test.c +++ b/tests/forms-test.c @@ -43,7 +43,7 @@ do_hello_test_curl (int n, gboolean extra, const char *uri) char *str_stdout = NULL; GError *error = NULL; - debug_printf (1, "%2d. '%s' '%s'%s: ", n * 2 + (extra ? 2 : 1), + debug_printf (1, "%2d. '%s' '%s'%s: \n", n * 2 + (extra ? 2 : 1), tests[n].title ? tests[n].title : "(null)", tests[n].name ? tests[n].name : "(null)", extra ? " + extra" : ""); @@ -110,7 +110,7 @@ do_hello_test_libsoup (int n, gboolean extra, const char *uri) GBytes *body; char *encoded; - debug_printf (1, "%2d. '%s' '%s'%s: ", n * 2 + (extra ? 2 : 1), + debug_printf (1, "%2d. '%s' '%s'%s: \n", n * 2 + (extra ? 2 : 1), tests[n].title ? tests[n].title : "(null)", tests[n].name ? tests[n].name : "(null)", extra ? " + extra" : ""); diff --git a/tests/meson.build b/tests/meson.build index ecb41887..1cae853d 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -159,7 +159,13 @@ foreach test: tests ) # Increase the timeout as on some architectures the tests could be slower # than the default 30 seconds. - test(test_name, test_target, env : env, is_parallel : test[1], timeout : 60) + test(test_name, test_target, + args : ['--debug'], + env : env, + is_parallel : test[1], + timeout : 60, + protocol : 'tap', + ) endforeach executable('ntlm-test-helper', 'ntlm-test-helper.c', diff --git a/tests/server-test.c b/tests/server-test.c index 9f3f019d..1ae6c385 100644 --- a/tests/server-test.c +++ b/tests/server-test.c @@ -1207,7 +1207,7 @@ tunnel_wrote_cb (GObject *object, g_error_free (error); return; } else if (error) { - g_print ("Tunnel write failed: %s\n", error->message); + debug_printf (1, "Tunnel write failed: %s\n", error->message); g_error_free (error); } tunnel_close (tunnel); @@ -1253,7 +1253,7 @@ tunnel_read_cb (GObject *object, g_error_free (error); return; } else if (error) { - g_print ("Tunnel read failed: %s\n", error->message); + debug_printf (1, "Tunnel read failed: %s\n", error->message); g_error_free (error); } tunnel_close (tunnel); diff --git a/tests/test-utils.c b/tests/test-utils.c index 27734d8b..9308972f 100644 --- a/tests/test-utils.c +++ b/tests/test-utils.c @@ -123,10 +123,17 @@ void debug_printf (int level, const char *format, ...) { va_list args; + static char last_char = '\n'; if (debug_level < level) return; + /* Very hacky solution to outputing in the TAP format, + * every line starts with # */ + if (last_char == '\n') + g_printf ("# "); + last_char = format[strlen (format) - 1]; + va_start (args, format); g_vprintf (format, args); va_end (args); |