提交 e911de2a 编写于 作者: C Cole Robinson

tests: qemuxml2argv: centralize CAPS suffix building

Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 504492a6
...@@ -799,12 +799,12 @@ mymain(void) ...@@ -799,12 +799,12 @@ mymain(void)
* the test cases should be forked using DO_TEST_CAPS_VER with the appropriate * the test cases should be forked using DO_TEST_CAPS_VER with the appropriate
* version. * version.
*/ */
# define DO_TEST_CAPS_INTERNAL(_name, _suffix, \ # define DO_TEST_CAPS_INTERNAL(_name, arch, ver, \
arch, capsfile, stripmachinealiases, ...) \ capsfile, stripmachinealiases, ...) \
do { \ do { \
static struct testInfo info = { \ static struct testInfo info = { \
.name = _name, \ .name = _name, \
.suffix = "." _suffix, \ .suffix = "." arch "-" ver, \
}; \ }; \
if (!(info.qemuCaps = qemuTestParseCapabilitiesArch(virArchFromString(arch), \ if (!(info.qemuCaps = qemuTestParseCapabilitiesArch(virArchFromString(arch), \
capsfile))) \ capsfile))) \
...@@ -814,7 +814,7 @@ mymain(void) ...@@ -814,7 +814,7 @@ mymain(void)
if (testInfoSetArgs(&info, __VA_ARGS__, ARG_END) < 0) \ if (testInfoSetArgs(&info, __VA_ARGS__, ARG_END) < 0) \
return EXIT_FAILURE; \ return EXIT_FAILURE; \
info.flags |= FLAG_REAL_CAPS; \ info.flags |= FLAG_REAL_CAPS; \
if (virTestRun("QEMU XML-2-ARGV " _name "." _suffix, \ if (virTestRun("QEMU XML-2-ARGV " _name "." arch "-" ver, \
testCompareXMLToArgv, &info) < 0) \ testCompareXMLToArgv, &info) < 0) \
ret = -1; \ ret = -1; \
virObjectUnref(info.qemuCaps); \ virObjectUnref(info.qemuCaps); \
...@@ -823,8 +823,8 @@ mymain(void) ...@@ -823,8 +823,8 @@ mymain(void)
# define TEST_CAPS_PATH abs_srcdir "/qemucapabilitiesdata/caps_" # define TEST_CAPS_PATH abs_srcdir "/qemucapabilitiesdata/caps_"
# define DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ...) \ # define DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ...) \
DO_TEST_CAPS_INTERNAL(name, arch "-" ver, \ DO_TEST_CAPS_INTERNAL(name, arch, ver, \
arch, TEST_CAPS_PATH ver "." arch ".xml", false, \ TEST_CAPS_PATH ver "." arch ".xml", false, \
__VA_ARGS__) __VA_ARGS__)
# define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \ # define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \
...@@ -834,7 +834,7 @@ mymain(void) ...@@ -834,7 +834,7 @@ mymain(void)
DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver)
# define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \ # define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \
DO_TEST_CAPS_INTERNAL(name, arch "-latest", arch, \ DO_TEST_CAPS_INTERNAL(name, arch, "latest", \
virHashLookup(capslatest, arch), true, \ virHashLookup(capslatest, arch), true, \
__VA_ARGS__) __VA_ARGS__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册