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