]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: tests: build commandhelper binary
authorPavel Hrdina <phrdina@redhat.com>
Thu, 18 Jun 2020 00:02:30 +0000 (02:02 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:05 +0000 (09:27 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
tests/Makefile.am
tests/meson.build

index a8fea66f1dc685561c91064a3c35788cd19b58be..d33b51d7f324e7ae3019e1991f4cf97671c70282 100644 (file)
@@ -35,7 +35,7 @@ LDADDS = \
        $(GLIB_LIBS) \
        $(NULL)
 
-test_helpers = commandhelper ssh
+test_helpers = ssh
 test_programs = virshtest sockettest \
        virhostcputest virbuftest \
        commandtest seclabeltest \
@@ -754,18 +754,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)
index 5cbd3cd20774cffc65157003a1bf392db78bdede..fa116a0e24955ef72e074d3f0e4426995d53ffdd 100644 (file)
@@ -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,
+  ],
+)