mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-01 03:18:06 +02:00
test: disable g_log_set_always_fatal() for non-assert tests on older glib versions
This fixes test-failure for src/platform/tests/test-link-fake on older systems.
This commit is contained in:
parent
7ae20d70bf
commit
ea0e36b61d
1 changed files with 5 additions and 0 deletions
|
|
@ -400,8 +400,13 @@ __nmtst_init (int *argc, char ***argv, gboolean assert_logging, const char *log_
|
|||
*out_set_logging = TRUE;
|
||||
#endif
|
||||
g_assert (success);
|
||||
#if GLIB_CHECK_VERSION(2,34,0)
|
||||
if (__nmtst_internal.no_expect_message)
|
||||
g_log_set_always_fatal (G_LOG_FATAL_MASK);
|
||||
#else
|
||||
/* g_test_expect_message() is a NOP, so allow any messages */
|
||||
g_log_set_always_fatal (G_LOG_FATAL_MASK);
|
||||
#endif
|
||||
} else if (__nmtst_internal.no_expect_message) {
|
||||
/* We have a test that would be assert_logging, but the user specified no_expect_message.
|
||||
* This transforms g_test_expect_message() into a NOP, but we also have to relax
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue