mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
qemuxmlconftest: Propery discriminate output files for caps variants
While the 'qemuxmlconftest' was able to load capability variants the output file name didn't include the variant thus it was not possible to test the same input file both on the default variant and on an explicit variant. Include the variant in the output file name and adjust two output file names. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
4492348b96
commit
59e528ea0d
@ -1006,14 +1006,18 @@ testRun(const char *name,
|
||||
va_end(ap);
|
||||
|
||||
info->infile = g_strdup_printf("%s/qemuxmlconfdata/%s.xml", abs_srcdir, info->name);
|
||||
|
||||
if (info->flags & (FLAG_EXPECT_FAILURE | FLAG_EXPECT_PARSE_ERROR)) {
|
||||
info->errfile = g_strdup_printf("%s/qemuxmlconfdata/%s%s.err", abs_srcdir, info->name, suffix);
|
||||
info->errfile = g_strdup_printf("%s/qemuxmlconfdata/%s%s%s.err",
|
||||
abs_srcdir, info->name, suffix, info->args.capsvariant);
|
||||
} else {
|
||||
info->outfile = g_strdup_printf("%s/qemuxmlconfdata/%s%s.args", abs_srcdir, info->name, suffix);
|
||||
info->outfile = g_strdup_printf("%s/qemuxmlconfdata/%s%s%s.args",
|
||||
abs_srcdir, info->name, suffix, info->args.capsvariant);
|
||||
}
|
||||
|
||||
if (!(info->flags & FLAG_EXPECT_PARSE_ERROR))
|
||||
info->out_xml_inactive = g_strdup_printf("%s/qemuxmlconfdata/%s%s.xml", abs_srcdir, info->name, suffix);
|
||||
info->out_xml_inactive = g_strdup_printf("%s/qemuxmlconfdata/%s%s%s.xml",
|
||||
abs_srcdir, info->name, suffix, info->args.capsvariant);
|
||||
|
||||
virTestRunLog(ret, name_parse, testXMLParse, info);
|
||||
virTestRunLog(ret, name_xml, testCompareDef2XML, info);
|
||||
|
@ -754,6 +754,9 @@ testQemuInfoSetArgs(testQemuInfo *info,
|
||||
if (info->args.invalidarg)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!info->args.capsvariant)
|
||||
info->args.capsvariant = "";
|
||||
}
|
||||
|
||||
|
||||
@ -913,9 +916,6 @@ testQemuInfoInitArgs(testQemuInfo *info)
|
||||
|
||||
info->args.newargs = false;
|
||||
|
||||
if (!info->args.capsvariant)
|
||||
info->args.capsvariant = "";
|
||||
|
||||
if (info->args.invalidarg) {
|
||||
fprintf(stderr, "Invalid argument encountered by 'testQemuInfoSetArgs'\n");
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user