]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: mock swtpm initialization for all qemu tests
authorCole Robinson <crobinso@redhat.com>
Sat, 18 Jun 2022 17:21:57 +0000 (13:21 -0400)
committerCole Robinson <crobinso@redhat.com>
Tue, 21 Jun 2022 12:23:18 +0000 (08:23 -0400)
Don't restrict this to domcaps testing only, we will soon
need it for qemu command line validation

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
tests/domaincapstest.c
tests/testutilsqemu.c

index da5c629fd42b7f2b80c754d6fcce043fabe309bb..3b8216a8f66b51c21a8034dc50b378510cce09ba 100644 (file)
@@ -22,7 +22,6 @@
 #include "domain_capabilities.h"
 #include "virfilewrapper.h"
 #include "configmake.h"
-#include "virtpm.h"
 
 
 #define VIR_FROM_THIS VIR_FROM_NONE
@@ -129,12 +128,6 @@ fillQemuCaps(virDomainCaps *domCaps,
 }
 
 
-/* Enough to tell capabilities code that swtpm is usable */
-bool virTPMHasSwtpm(void)
-{
-    return true;
-}
-
 #endif /* WITH_QEMU */
 
 
index d26caba5fb2830b232afdff3aca3d018ecda697d..6dabbaf36ab5b148863a602c58eca709de492122 100644 (file)
@@ -11,6 +11,7 @@
 # include "qemu/qemu_capspriv.h"
 # include "virstring.h"
 # include "virfilecache.h"
+# include "virtpm.h"
 
 # include <sys/types.h>
 # include <fcntl.h>
@@ -138,6 +139,13 @@ virFindFileInPath(const char *file)
 }
 
 
+/* Enough to tell capabilities code that swtpm is usable */
+bool virTPMHasSwtpm(void)
+{
+    return true;
+}
+
+
 virCapsHostNUMA *
 virCapabilitiesHostNUMANewHost(void)
 {