Rather than completely compiling out the tests mark them as skipped.
This will allow us to add a checker that all input files are accounted
for.

Signed-off-by: Peter Krempa <[email protected]>
---
Sending addendum to the series to avoid resending the whole series.

 tests/qemuxml2argvtest.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 48ee433495..7d40b06171 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -627,6 +627,15 @@ testCompareXMLToArgv(const void *data)
     if (testInfoCheckDuplicate(info) < 0)
         goto cleanup;

+# if !WITH_NBDKIT
+    /* when compiled without nbdkit support we want to skip the test after
+     * marking it as used */
+    if (info->args.fakeNbdkitCaps) {
+        ret = EXIT_AM_SKIP;
+        goto cleanup;
+    }
+# endif /* !WITH_NBDKIT */
+
     if (info->arch != VIR_ARCH_NONE && info->arch != VIR_ARCH_X86_64)
         qemuTestSetHostArch(&driver, info->arch);

@@ -906,12 +915,8 @@ mymain(void)
 # define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \
     DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ARG_END)

-# if WITH_NBDKIT
-#  define DO_TEST_CAPS_LATEST_NBDKIT(name, ...) \
+# define DO_TEST_CAPS_LATEST_NBDKIT(name, ...) \
     DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", ARG_NBDKIT_CAPS, 
__VA_ARGS__, QEMU_NBDKIT_CAPS_LAST, ARG_END)
-# else
-#  define DO_TEST_CAPS_LATEST_NBDKIT(name, ...)
-# endif /* WITH_NBDKIT */

 # define DO_TEST_CAPS_LATEST(name) \
     DO_TEST_CAPS_ARCH_LATEST(name, "x86_64")
-- 
2.43.0
_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to