diff --git a/tests/Makefile.am b/tests/Makefile.am index 011cda7b31..a8fea66f1d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -137,7 +137,7 @@ test_programs += qemuxml2argvtest qemuxml2xmltest \ qemuvhostusertest \ $(NULL) test_helpers += qemucapsprobe -test_libraries += libqemumonitortestutils.la \ +test_libraries += \ libqemutestdriver.la \ $(NULL) endif WITH_QEMU @@ -352,16 +352,8 @@ libxlxml2domconfigtest_LDADD = libxltestdriver.la \ $(libxl_LDADDS) $(LIBXML_LIBS) endif WITH_LIBXL -QEMUMONITORTESTUTILS_SOURCES = \ - qemumonitortestutils.c \ - qemumonitortestutils.h \ - testutilsqemuschema.h testutilsqemuschema.c \ - $(NULL) - if WITH_QEMU -libqemumonitortestutils_la_SOURCES = $(QEMUMONITORTESTUTILS_SOURCES) - qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la if WITH_DTRACE_PROBES qemu_LDADDS += ../src/libvirt_qemu_probes.lo diff --git a/tests/meson.build b/tests/meson.build index ca6e5b5f74..5cbd3cd207 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -117,3 +117,56 @@ foreach mock : mock_libs ], ) endforeach + + +# build libraries used by tests + +test_utils_lib = static_library( + 'test_utils', + [ 'testutils.c' ], + dependencies: [ tests_dep ], +) + +if conf.has('WITH_LIBXL') + test_utils_xen_lib = static_library( + 'test_utils_xen', + [ 'testutilsxen.c' ], + dependencies: [ tests_dep ], + ) + +else + test_utils_xen_lib = [] +endif + +if conf.has('WITH_LXC') + test_utils_lxc_lib = static_library( + 'test_utils_lxc', + [ 'testutilslxc.c' ], + dependencies: [ tests_dep ], + ) +else + test_utils_lxc_lib = [] +endif + +if conf.has('WITH_QEMU') + test_utils_qemu_lib = static_library( + 'test_utils_qemu', + [ 'testutilsqemu.c' ], + dependencies: [ tests_dep ], + ) + + test_utils_qemu_monitor_lib = static_library( + 'test_utils_qemu_monitor', + [ 'qemumonitortestutils.c', 'testutilsqemuschema.c' ], + dependencies: [ tests_dep ], + ) +else + test_utils_qemu_lib = [] + test_utils_qemu_monitor_lib = [] +endif + +test_file_wrapper_lib = static_library( + 'test_file_wrapper', + [ 'virfilewrapper.c' ], + dependencies: [ tests_dep ], +) diff --git a/tests/testutils.c b/tests/testutils.c index a1cd093e4e..3f53f635fc 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -340,7 +340,7 @@ virTestRewrapFile(const char *filename) script = g_strdup_printf("%s/scripts/test-wrap-argv.py", abs_top_srcdir); - cmd = virCommandNewArgList(PYTHON, script, "--in-place", filename, NULL); + cmd = virCommandNewArgList(PYTHON3, script, "--in-place", filename, NULL); if (virCommandRun(cmd, NULL) < 0) return -1;