[libvirt PATCH 299/351] meson: tests: add qemu specific tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 tests/Makefile.am | 138 ----------------------------------------------
 tests/meson.build |  21 +++++++
 2 files changed, 21 insertions(+), 138 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9e436512fef..a821b0e0af7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -38,18 +38,6 @@ endif WITH_ATTR
 endif WITH_SECDRIVER_SELINUX
 
 if WITH_QEMU
-test_programs += qemuxml2argvtest qemuxml2xmltest \
-	qemudomaincheckpointxml2xmltest qemudomainsnapshotxml2xmltest \
-	qemumonitorjsontest qemuhotplugtest \
-	qemuagenttest qemucapabilitiestest qemucaps2xmltest \
-	qemumemlocktest \
-	qemucommandutiltest \
-	qemublocktest \
-	qemumigparamstest \
-	qemusecuritytest \
-	qemufirmwaretest \
-	qemuvhostusertest \
-	$(NULL)
 test_helpers += qemucapsprobe
 endif WITH_QEMU
 
@@ -148,136 +136,10 @@ valgrind:
 	$(MAKE) check VG="$(LIBTOOL) --mode=execute $(VALGRIND)"
 
 if WITH_QEMU
-
-qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la
-if WITH_DTRACE_PROBES
-qemu_LDADDS += ../src/libvirt_qemu_probes.lo
-endif WITH_DTRACE_PROBES
-qemu_LDADDS += $(LDADDS)
-
-qemuxml2argvtest_SOURCES = \
-	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
-	testutils.c testutils.h \
-	virfilewrapper.c virfilewrapper.h \
-	$(NULL)
-qemuxml2argvtest_LDADD = libqemutestdriver.la libqemumonitortestutils.la \
-	$(LDADDS) $(LIBXML_LIBS)
-
-qemuxml2xmltest_SOURCES = \
-	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
-	testutils.c testutils.h \
-	virfilewrapper.c virfilewrapper.h
-qemuxml2xmltest_LDADD = $(qemu_LDADDS)
-
-qemumonitorjsontest_SOURCES = \
-	qemumonitorjsontest.c \
-	testutils.c testutils.h \
-	testutilsqemu.c testutilsqemu.h \
-	$(NULL)
-qemumonitorjsontest_LDADD = libqemumonitortestutils.la \
-	$(qemu_LDADDS)
-
-qemucapabilitiestest_SOURCES = \
-	qemucapabilitiestest.c \
-	testutils.c testutils.h \
-	testutilsqemu.c testutilsqemu.h \
-	$(NULL)
-qemucapabilitiestest_LDADD = libqemumonitortestutils.la \
-	$(qemu_LDADDS)
-
 qemucapsprobe_SOURCES = \
 	qemucapsprobe.c
 qemucapsprobe_LDADD = \
 	libqemutestdriver.la $(LDADDS)
-
-qemucommandutiltest_SOURCES = \
-	qemucommandutiltest.c \
-	testutils.c testutils.h \
-	testutilsqemu.c testutilsqemu.h \
-	$(NULL)
-qemucommandutiltest_LDADD = libqemumonitortestutils.la \
-	$(qemu_LDADDS)
-
-qemucaps2xmltest_SOURCES = \
-	qemucaps2xmltest.c \
-	testutils.c testutils.h \
-	testutilsqemu.c testutilsqemu.h \
-	$(NULL)
-qemucaps2xmltest_LDADD = $(qemu_LDADDS)
-
-qemuagenttest_SOURCES = \
-	qemuagenttest.c \
-	testutils.c testutils.h \
-	testutilsqemu.c testutilsqemu.h \
-	$(NULL)
-qemuagenttest_LDADD = libqemumonitortestutils.la $(qemu_LDADDS)
-
-qemuhotplugtest_SOURCES = \
-	qemuhotplugtest.c \
-	testutils.c testutils.h \
-	testutilsqemu.c testutilsqemu.h \
-	$(NULL)
-qemuhotplugtest_LDADD = \
-	libqemutestdriver.la \
-	libqemumonitortestutils.la \
-	$(qemu_LDADDS) \
-	$(NULL)
-
-qemublocktest_SOURCES = \
-	qemublocktest.c \
-	testutils.h testutils.c \
-	testutilsqemu.h testutilsqemu.c \
-	$(NULL)
-qemublocktest_LDADD = \
-	libqemumonitortestutils.la \
-	../src/libvirt.la \
-	$(qemu_LDADDS) \
-	$(NULL)
-
-qemudomaincheckpointxml2xmltest_SOURCES = \
-	qemudomaincheckpointxml2xmltest.c testutilsqemu.c testutilsqemu.h \
-	testutils.c testutils.h
-qemudomaincheckpointxml2xmltest_LDADD = $(qemu_LDADDS)
-
-qemudomainsnapshotxml2xmltest_SOURCES = \
-	qemudomainsnapshotxml2xmltest.c testutilsqemu.c testutilsqemu.h \
-	testutils.c testutils.h
-qemudomainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS)
-
-qemumemlocktest_SOURCES = \
-	qemumemlocktest.c \
-	testutilsqemu.c testutilsqemu.h \
-	testutils.c testutils.h
-qemumemlocktest_LDADD = $(qemu_LDADDS)
-
-qemumigparamstest_SOURCES = \
-	qemumigparamstest.c \
-	testutils.c testutils.h \
-	testutilsqemu.c testutilsqemu.h \
-	$(NULL)
-qemumigparamstest_LDADD = libqemumonitortestutils.la \
-	$(qemu_LDADDS)
-
-qemusecuritytest_SOURCES = \
-	qemusecuritytest.c qemusecuritytest.h \
-	qemusecuritymock.c \
-	testutils.h testutils.c \
-	testutilsqemu.h testutilsqemu.c
-qemusecuritytest_LDADD = $(qemu_LDADDS)
-
-qemufirmwaretest_SOURCES = \
-	qemufirmwaretest.c \
-	testutils.h testutils.c \
-	virfilewrapper.c virfilewrapper.h \
-	$(NULL)
-qemufirmwaretest_LDADD = $(qemu_LDADDS)
-
-qemuvhostusertest_SOURCES = \
-	qemuvhostusertest.c \
-	testutils.h testutils.c \
-	virfilewrapper.c virfilewrapper.h \
-	$(NULL)
-qemuvhostusertest_LDADD = $(qemu_LDADDS)
 endif ! WITH_QEMU
 
 if WITH_VBOX
diff --git a/tests/meson.build b/tests/meson.build
index 6dd926e96b8..7a96d11e842 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -430,6 +430,27 @@ if conf.has('WITH_OPENVZ')
   ]
 endif
 
+if conf.has('WITH_QEMU')
+  tests += [
+    { 'name': 'qemuagenttest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib, test_utils_qemu_monitor_lib ] },
+    { 'name': 'qemublocktest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib, test_utils_qemu_monitor_lib ] },
+    { 'name': 'qemucapabilitiestest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib, test_utils_qemu_monitor_lib ] },
+    { 'name': 'qemucaps2xmltest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib ] },
+    { 'name': 'qemucommandutiltest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib, test_utils_qemu_monitor_lib ] },
+    { 'name': 'qemudomaincheckpointxml2xmltest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib ] },
+    { 'name': 'qemudomainsnapshotxml2xmltest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib ] },
+    { 'name': 'qemufirmwaretest', 'link_with': [ test_qemu_driver_lib, test_file_wrapper_lib ] },
+    { 'name': 'qemuhotplugtest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib, test_utils_qemu_monitor_lib ] },
+    { 'name': 'qemumemlocktest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib ] },
+    { 'name': 'qemumigparamstest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib, test_utils_qemu_monitor_lib ] },
+    { 'name': 'qemumonitorjsontest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib, test_utils_qemu_monitor_lib ] },
+    { 'name': 'qemusecuritytest', 'sources': [ 'qemusecuritytest.c', 'qemusecuritymock.c' ], 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib ] },
+    { 'name': 'qemuvhostusertest', 'link_with': [ test_qemu_driver_lib, test_file_wrapper_lib ] },
+    { 'name': 'qemuxml2argvtest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib, test_utils_qemu_monitor_lib, test_file_wrapper_lib ] },
+    { 'name': 'qemuxml2xmltest', 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib, test_file_wrapper_lib ] },
+  ]
+endif
+
 foreach data : tests
   test_sources = '@0@.c'.format(data['name'])
   test_bin = executable(
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux