From 15dd03e0826f2209e05b3ef1523e3117d6a1ed7f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Sat, 8 Sep 2018 23:10:23 +0200 Subject: [PATCH] tests: only run startup XML tests if requested MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Use the recently introduced flag as a witness. This reduces the apparent number of test cases to the real number of test cases. Note that this does not suffer from the same problem as commit 70255fa was fixing, because the condition for running virTestRun does not depend on results of previous tests. Signed-off-by: Ján Tomko --- tests/qemuxml2argvtest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 244c678b9e..8c3029d857 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -475,6 +475,8 @@ testCheckExclusiveFlags(int flags) FLAG_STEAL_VM | 0, -1); + VIR_EXCLUSIVE_FLAGS_RET(FLAG_STEAL_VM, FLAG_EXPECT_FAILURE, -1); + VIR_EXCLUSIVE_FLAGS_RET(FLAG_STEAL_VM, FLAG_EXPECT_PARSE_ERROR, -1); return 0; } @@ -842,7 +844,8 @@ mymain(void) if (virTestRun("QEMU XML-2-ARGV " name, \ testCompareXMLToArgv, &info) < 0) \ ret = -1; \ - if (virTestRun("QEMU XML-2-startup-XML " name, \ + if (((flags) & FLAG_STEAL_VM) && \ + virTestRun("QEMU XML-2-startup-XML " name, \ testCompareXMLToStartupXML, &info) < 0) \ ret = -1; \ virObjectUnref(info.qemuCaps); \ -- 2.47.2