From 7b16f6df280fdf993f81ac754ad3b190e354597c Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Mon, 27 Jul 2020 11:36:53 +0200 Subject: [PATCH] meson: tests: add libxl specific tests Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- tests/Makefile.am | 30 ------------------------------ tests/meson.build | 8 ++++++++ 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index b5f555baa4..02ef2ec84b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 diff --git a/tests/meson.build b/tests/meson.build index 87dd99df88..ccc9fe01a7 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -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(