]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: tests: add libxl specific tests
authorPavel Hrdina <phrdina@redhat.com>
Mon, 27 Jul 2020 09:36:53 +0000 (11:36 +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 b5f555baa4afdfa0f1a05511745715f66e770d4b..02ef2ec84b565c3d5da9c9ca317dbf8eaca9249f 100644 (file)
@@ -37,11 +37,6 @@ endif WITH_QEMU
 endif WITH_ATTR
 endif WITH_SECDRIVER_SELINUX
 
-if WITH_LIBXL
-test_programs += xlconfigtest \
-       xmconfigtest libxlxml2domconfigtest
-endif WITH_LIBXL
-
 if WITH_QEMU
 test_programs += qemuxml2argvtest qemuxml2xmltest \
        qemudomaincheckpointxml2xmltest qemudomainsnapshotxml2xmltest \
@@ -174,31 +169,6 @@ VALGRIND = valgrind --quiet --leak-check=full --trace-children=yes \
 valgrind:
        $(MAKE) check VG="$(LIBTOOL) --mode=execute $(VALGRIND)"
 
-if WITH_LIBXL
-libxl_LDADDS = \
-       ../src/libvirt_driver_libxl_impl.la \
-       $(LDADDS) \
-       $(NULL)
-
-xlconfigtest_SOURCES = \
-       xlconfigtest.c testutilsxen.c testutilsxen.h \
-       testutils.c testutils.h
-xlconfigtest_LDADD = libxltestdriver.la \
-       $(libxl_LDADDS)
-
-xmconfigtest_SOURCES = \
-       xmconfigtest.c testutilsxen.c testutilsxen.h \
-       testutils.c testutils.h
-xmconfigtest_LDADD = libxltestdriver.la \
-       $(libxl_LDADDS)
-
-libxlxml2domconfigtest_SOURCES = \
-       libxlxml2domconfigtest.c testutilsxen.c testutilsxen.h \
-       testutils.c testutils.h
-libxlxml2domconfigtest_LDADD = libxltestdriver.la \
-       $(libxl_LDADDS) $(LIBXML_LIBS)
-endif WITH_LIBXL
-
 if WITH_QEMU
 
 qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la
index 87dd99df88346cf50824c2e653c28fda9fbb3197..ccc9fe01a7435f9506e5e66f695cd6512860c483 100644 (file)
@@ -381,6 +381,14 @@ if conf.has('WITH_LIBVIRTD')
   ]
 endif
 
+if conf.has('WITH_LIBXL')
+  tests += [
+    { 'name': 'libxlxml2domconfigtest', 'link_with': [ test_xen_driver_lib ], 'link_whole': [ test_utils_xen_lib ], 'deps': [ libxl_dep ] },
+    { 'name': 'xlconfigtest', 'link_with': [ test_xen_driver_lib ], 'link_whole': [ test_utils_xen_lib ] },
+    { 'name': 'xmconfigtest', 'link_with': [ test_xen_driver_lib ], 'link_whole': [ test_utils_xen_lib ] },
+  ]
+endif
+
 foreach data : tests
   test_sources = '@0@.c'.format(data['name'])
   test_bin = executable(