From: Pavel Hrdina Date: Thu, 18 Jun 2020 00:02:30 +0000 (+0200) Subject: meson: tests: build commandhelper binary X-Git-Tag: v6.7.0-rc1~322 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fe8df4b2026ca21db123ddc0cdd8451a2e224dd;p=thirdparty%2Flibvirt.git meson: tests: build commandhelper binary Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- diff --git a/tests/Makefile.am b/tests/Makefile.am index a8fea66f1d..d33b51d7f3 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 \ @@ -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) diff --git a/tests/meson.build b/tests/meson.build index 5cbd3cd207..fa116a0e24 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, + ], +)