mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 18:00:18 +01:00
systemd/tests: don't link test-systemd against libNetworkManagerBase
One point of test-systemd is to see whether our internal systemd code can fully link without external systemd library. In fact, we want all symbols from the internal systemd code to resolve, because when we link against an external libsystemd library, we may mix differing APIs, resulting in subtle bugs. Currently, it may well be that libNetworkManagerBase.la already links against libsystemd, which would result in test-systemd to wrongly succeed resolving all names. Fix that, by don't link libNetworkManagerBase.la into test-systemd.
This commit is contained in:
parent
f124f8772e
commit
9c8b7b001e
2 changed files with 45 additions and 1 deletions
|
|
@ -130,7 +130,6 @@ test_systemd_SOURCES = \
|
|||
test-systemd.c
|
||||
|
||||
test_systemd_LDADD = \
|
||||
$(top_builddir)/src/libNetworkManagerBase.la \
|
||||
$(top_builddir)/src/libsystemd-nm.la
|
||||
|
||||
####### utils test #######
|
||||
|
|
|
|||
|
|
@ -27,6 +27,51 @@
|
|||
|
||||
#include "nm-test-utils-core.h"
|
||||
|
||||
/*****************************************************************************
|
||||
* Stub implementations of libNetworkManagerBase symbols
|
||||
*****************************************************************************/
|
||||
|
||||
gboolean
|
||||
nm_utils_get_testing_initialized (void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
_nm_utils_set_testing (NMUtilsTestFlags flags)
|
||||
{
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
gint32
|
||||
nm_utils_get_monotonic_timestamp_s (void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
NMLogDomain _nm_logging_enabled_state[_LOGL_N_REAL];
|
||||
|
||||
void
|
||||
_nm_log_impl (const char *file,
|
||||
guint line,
|
||||
const char *func,
|
||||
NMLogLevel level,
|
||||
NMLogDomain domain,
|
||||
int error,
|
||||
const char *fmt,
|
||||
...)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_logging_setup (const char *level,
|
||||
const char *domains,
|
||||
char **bad_domains,
|
||||
GError **error)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue