提交 844a5c1e 编写于 作者: J Jiri Denemark

tests: Fix systemd test with --without-driver-modules

Every test that makes use of virmock.h (only virsystemdtest as of now)
needs to be linked with -export-dynamic to make sure the LD_PRELOADed
mock library can access its wrap_* symbols. Normally,
DRIVER_MODULE_LDFLAGS variable contains -export-dynamic but when
--without-driver-modules configure option is used, DRIVER_MODULE_LDFLAGS
is empty.

This patch turns on -export-dynamic for all tests unconditionally
regardless on --without-driver-modules. This fixes virsystemdtest and
all future users of virmock.h.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 5dfcd6fb
...@@ -43,6 +43,9 @@ AM_CFLAGS = \ ...@@ -43,6 +43,9 @@ AM_CFLAGS = \
$(COVERAGE_CFLAGS) \ $(COVERAGE_CFLAGS) \
$(WARN_CFLAGS) $(WARN_CFLAGS)
AM_LDFLAGS = \
-export-dynamic
if WITH_DRIVER_MODULES if WITH_DRIVER_MODULES
INCLUDES += \ INCLUDES += \
-DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\" -DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\"
...@@ -921,7 +924,6 @@ virsystemdtest_SOURCES = \ ...@@ -921,7 +924,6 @@ virsystemdtest_SOURCES = \
virsystemdtest.c testutils.h testutils.c virsystemdtest.c testutils.h testutils.c
virsystemdtest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) virsystemdtest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
virsystemdtest_LDADD = $(LDADDS) virsystemdtest_LDADD = $(LDADDS)
virsystemdtest_LDFLAGS = $(DRIVER_MODULE_LDFLAGS)
else ! WITH_DBUS else ! WITH_DBUS
EXTRA_DIST += virdbustest.c virmockdbus.c virsystemdtest.c EXTRA_DIST += virdbustest.c virmockdbus.c virsystemdtest.c
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册