0a7476
From ba181c8056ee3e31fccf1d4d0e5d5e2c8cf44385 Mon Sep 17 00:00:00 2001
0a7476
Message-Id: <ba181c8056ee3e31fccf1d4d0e5d5e2c8cf44385@dist-git>
0a7476
From: Jiri Denemark <jdenemar@redhat.com>
0a7476
Date: Tue, 4 Jun 2019 13:04:28 +0200
0a7476
Subject: [PATCH] qemuargv2xmltest: Use mocked virQEMUCapsProbeHostCPU
0a7476
MIME-Version: 1.0
0a7476
Content-Type: text/plain; charset=UTF-8
0a7476
Content-Transfer-Encoding: 8bit
0a7476
0a7476
The qemuTestParseCapabilitiesArch call would eventually lead to the host
0a7476
CPU being probed via virCPUGetHost. Let's divert this to a mocked
0a7476
version already used by the qemuxml2argvtest.
0a7476
0a7476
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
0a7476
(cherry picked from commit 02c1d3a6e1d24a777254f4dceeaf54942db7f871)
0a7476
0a7476
https://bugzilla.redhat.com/show_bug.cgi?id=1641702
0a7476
0a7476
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
0a7476
Message-Id: <8f9d0381acd27b583cb3dc0f6294d4c8c5bdfce6.1559646067.git.jdenemar@redhat.com>
0a7476
Reviewed-by: Ján Tomko <jtomko@redhat.com>
0a7476
---
0a7476
 tests/Makefile.am        | 3 ++-
0a7476
 tests/qemuargv2xmltest.c | 3 ++-
0a7476
 2 files changed, 4 insertions(+), 2 deletions(-)
0a7476
0a7476
diff --git a/tests/Makefile.am b/tests/Makefile.am
0a7476
index 4d0b4f9509..f871a8a102 100644
0a7476
--- a/tests/Makefile.am
0a7476
+++ b/tests/Makefile.am
0a7476
@@ -592,7 +592,8 @@ qemuxml2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS)
0a7476
 qemuargv2xmltest_SOURCES = \
0a7476
 	qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
0a7476
 	testutils.c testutils.h
0a7476
-qemuargv2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS)
0a7476
+qemuargv2xmltest_LDADD = libqemutestdriver.la \
0a7476
+	$(LDADDS)
0a7476
 
0a7476
 qemumonitorjsontest_SOURCES = \
0a7476
 	qemumonitorjsontest.c \
0a7476
diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c
0a7476
index cb010268c4..62e2013f79 100644
0a7476
--- a/tests/qemuargv2xmltest.c
0a7476
+++ b/tests/qemuargv2xmltest.c
0a7476
@@ -298,7 +298,8 @@ mymain(void)
0a7476
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
0a7476
 }
0a7476
 
0a7476
-VIR_TEST_MAIN(mymain)
0a7476
+VIR_TEST_MAIN_PRELOAD(mymain,
0a7476
+                      abs_builddir "/.libs/qemucpumock.so")
0a7476
 
0a7476
 #else
0a7476
 
0a7476
-- 
0a7476
2.21.0
0a7476