diff --git a/include/nm-test-utils.h b/include/nm-test-utils.h index def20bb4a..a4b249153 100644 --- a/include/nm-test-utils.h +++ b/include/nm-test-utils.h @@ -32,6 +32,8 @@ #include #include +#include "nm-utils.h" + struct __nmtst_internal { @@ -125,6 +127,7 @@ inline static void nmtst_init (int *argc, char ***argv, const char *log_level, const char *log_domains) { static gsize atexit_registered = 0; + GError *error = NULL; const char *nmtst_debug; gboolean is_debug = FALSE; char *c_log_level = NULL, *c_log_domains = NULL; @@ -222,6 +225,10 @@ nmtst_init (int *argc, char ***argv, const char *log_level, const char *log_doma g_assert (success); } + if (!nm_utils_init (&error)) + g_error ("failed to initialize libnm-util: %s", error->message); + g_assert (!error); + /* Delay messages until we setup logging. */ for (i = 0; i < debug_messages->len; i++) g_message ("%s", g_array_index (debug_messages, const char *, i));