diff --git a/contrib/scripts/nm-ci-run.sh b/contrib/scripts/nm-ci-run.sh index 14a4a2fe53..22450d40c7 100755 --- a/contrib/scripts/nm-ci-run.sh +++ b/contrib/scripts/nm-ci-run.sh @@ -201,7 +201,7 @@ run_autotools() { _print_test_logs "first-test" echo ">>>> RUN SECOND TEST (start)" - NMTST_DEBUG=TRACE,no-expect-message make check -k || : + NMTST_DEBUG="debug,TRACE,no-expect-message" make check -k || : echo ">>>> RUN SECOND TEST (done)" _print_test_logs "second-test" diff --git a/src/libnm-glib-aux/nm-test-utils.h b/src/libnm-glib-aux/nm-test-utils.h index b35eeb4b09..41e1a6cedf 100644 --- a/src/libnm-glib-aux/nm-test-utils.h +++ b/src/libnm-glib-aux/nm-test-utils.h @@ -772,6 +772,12 @@ nmtst_init(int *argc, char ***argv, gboolean assert_logging) static inline gboolean nmtst_is_debug(void) { + /* This is based on the "debug"/"no-debug" flag in "$NMTST_DEBUG". + * + * If debugging is enabled, print more information. However, make sure + * that the test behaves still in a similar manner and that the same code + * path are taken where it matters (it matters for example, if the code path + * consumes random numbers). */ g_assert(nmtst_initialized()); return __nmtst_internal.is_debug; }