[libvirt PATCH 293/351] meson: tests: add lxc specific tests

Pavel Hrdina phrdina at redhat.com
Thu Jul 16 09:58:49 UTC 2020


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 tests/Makefile.am | 22 ----------------------
 tests/meson.build |  7 +++++++
 2 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index ec57dd5543b..44f02da7af6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -53,10 +53,6 @@ test_programs += qemuxml2argvtest qemuxml2xmltest \
 test_helpers += qemucapsprobe
 endif WITH_QEMU
 
-if WITH_LXC
-test_programs += lxcxml2xmltest lxcconf2xmltest
-endif WITH_LXC
-
 if WITH_OPENVZ
 test_programs += openvzutilstest
 endif WITH_OPENVZ
@@ -306,24 +302,6 @@ qemuvhostusertest_SOURCES = \
 qemuvhostusertest_LDADD = $(qemu_LDADDS)
 endif ! WITH_QEMU
 
-if WITH_LXC
-
-lxc_LDADDS = \
-	../src/libvirt_driver_lxc_impl.la \
-	$(LDADDS) \
-	$(NULL)
-
-lxcxml2xmltest_SOURCES = \
-	lxcxml2xmltest.c testutilslxc.c testutilslxc.h \
-	testutils.c testutils.h
-lxcxml2xmltest_LDADD = $(lxc_LDADDS)
-
-lxcconf2xmltest_SOURCES = \
-	lxcconf2xmltest.c testutilslxc.c testutilslxc.h \
-	testutils.c testutils.h
-lxcconf2xmltest_LDADD = $(lxc_LDADDS)
-endif ! WITH_LXC
-
 if WITH_OPENVZ
 openvzutilstest_SOURCES = \
 	openvzutilstest.c \
diff --git a/tests/meson.build b/tests/meson.build
index 3b5938abfc4..439d95401ef 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -379,6 +379,13 @@ if conf.has('WITH_LIBXL')
   ]
 endif
 
+if conf.has('WITH_LXC')
+  tests += [
+    { 'name': 'lxcconf2xmltest', 'link_with': [ test_utils_lxc_lib, lxc_driver_impl_lib ] },
+    { 'name': 'lxcxml2xmltest', 'link_with': [ test_utils_lxc_lib, lxc_driver_impl_lib ] },
+  ]
+endif
+
 foreach data : tests
   test_sources = '@0 at .c'.format(data['name'])
   test_bin = executable(
-- 
2.26.2




More information about the libvir-list mailing list