Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
tests/Makefile.am | 14 +-------------
tests/meson.build | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3bc1a791a16..eaaae0c0568 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -35,7 +35,7 @@ LDADDS = \
$(GLIB_LIBS) \
$(NULL)
-test_helpers = commandhelper ssh
+test_helpers = ssh
test_programs = virshtest sockettest \
virhostcputest virbuftest \
commandtest seclabeltest \
@@ -759,18 +759,6 @@ commandtest_SOURCES = \
commandtest.c testutils.h testutils.c
commandtest_LDADD = $(LDADDS)
-# Must not link to any libvirt modules - libc only
-# otherwise external libraries might unexpectedly leak
-# file descriptors into commandhelper invalidating the
-# test logic assumptions
-commandhelper_SOURCES = \
- commandhelper.c
-commandhelper_LDADD = \
- $(NO_INDIRECT_LDFLAGS)
-
-commandhelper_LDFLAGS = -static
-
-
virkmodtest_SOURCES = \
virkmodtest.c testutils.h testutils.c
virkmodtest_LDADD = $(LDADDS)
diff --git a/tests/meson.build b/tests/meson.build
index 5cbd3cd2077..fa116a0e249 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -170,3 +170,20 @@ test_file_wrapper_lib = static_library(
[ 'virfilewrapper.c' ],
dependencies: [ tests_dep ],
)
+
+
+# build helpers used by tests
+
+# Must not link to any libvirt modules - libc only otherwise external
+# libraries might unexpectedly leak file descriptors into commandhelper
+# invalidating the test logic assumptions.
+executable(
+ 'commandhelper',
+ [ 'commandhelper.c' ],
+ dependencies: [
+ tests_dep,
+ ],
+ link_args: [
+ libvirt_no_indirect,
+ ],
+)
--
2.26.2