mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 20:00:23 +01:00
nmtst: initialize g_test_init() after parsing NMTST_DEBUG
(cherry picked from commit 5031fc3c71)
This commit is contained in:
parent
dd32d973b0
commit
c3aafd9dab
1 changed files with 11 additions and 11 deletions
|
|
@ -275,17 +275,6 @@ __nmtst_init (int *argc, char ***argv, gboolean assert_logging, const char *log_
|
|||
if (argc)
|
||||
__nmtst_internal.orig_argv = g_strdupv (*argv);
|
||||
|
||||
if (argc && !g_test_initialized ()) {
|
||||
/* g_test_init() is a variadic function, so we cannot pass it
|
||||
* (variadic) arguments. If you need to pass additional parameters,
|
||||
* call nmtst_init() with argc==NULL and call g_test_init() yourself. */
|
||||
|
||||
/* g_test_init() sets g_log_set_always_fatal() for G_LOG_LEVEL_WARNING
|
||||
* and G_LOG_LEVEL_CRITICAL. So, beware that the test will fail if you
|
||||
* have any WARN or ERR log messages -- unless you g_test_expect_message(). */
|
||||
g_test_init (argc, argv, NULL);
|
||||
}
|
||||
|
||||
__nmtst_internal.assert_logging = !!assert_logging;
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 35, 0)
|
||||
|
|
@ -361,6 +350,17 @@ __nmtst_init (int *argc, char ***argv, gboolean assert_logging, const char *log_
|
|||
}
|
||||
}
|
||||
|
||||
if (argc && !g_test_initialized ()) {
|
||||
/* g_test_init() is a variadic function, so we cannot pass it
|
||||
* (variadic) arguments. If you need to pass additional parameters,
|
||||
* call nmtst_init() with argc==NULL and call g_test_init() yourself. */
|
||||
|
||||
/* g_test_init() sets g_log_set_always_fatal() for G_LOG_LEVEL_WARNING
|
||||
* and G_LOG_LEVEL_CRITICAL. So, beware that the test will fail if you
|
||||
* have any WARN or ERR log messages -- unless you g_test_expect_message(). */
|
||||
g_test_init (argc, argv, NULL);
|
||||
}
|
||||
|
||||
if (test_quick_set)
|
||||
__nmtst_internal.test_quick = test_quick;
|
||||
else if (test_quick_argv)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue