[PATCH v2 2/7] qemuargv2xmltest: Use mocked virQEMUCapsProbeHostCPU

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

 



The qemuTestParseCapabilitiesArch call would eventually lead to the host
CPU being probed via virCPUGetHost. Let's divert this to a mocked
version already used by the qemuxml2argvtest.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 tests/Makefile.am        | 3 ++-
 tests/qemuargv2xmltest.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 67375b3c19..6b17d99501 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -585,7 +585,8 @@ qemuxml2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS)
 qemuargv2xmltest_SOURCES = \
 	qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
 	testutils.c testutils.h
-qemuargv2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS)
+qemuargv2xmltest_LDADD = libqemutestdriver.la \
+	$(LDADDS)
 
 qemumonitorjsontest_SOURCES = \
 	qemumonitorjsontest.c \
diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c
index 2a51e22318..06e32898a2 100644
--- a/tests/qemuargv2xmltest.c
+++ b/tests/qemuargv2xmltest.c
@@ -309,7 +309,8 @@ mymain(void)
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
-VIR_TEST_MAIN(mymain)
+VIR_TEST_MAIN_PRELOAD(mymain,
+                      abs_builddir "/.libs/qemucpumock.so")
 
 #else
 
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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