tests: Reorder DO_TEST_CAPS_*() macros

Make sure the order is consistent between xml2argv and xml2xml,
and make room for more macros that are going to be introduced
shortly.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Andrea Bolognani 2019-07-02 17:33:31 +02:00
parent 791e20142a
commit a57d989430
2 changed files with 27 additions and 29 deletions

View File

@ -712,21 +712,21 @@ mymain(void)
ARG_CAPS_VER, ver, \ ARG_CAPS_VER, ver, \
__VA_ARGS__) __VA_ARGS__)
# define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \
DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END)
# define DO_TEST_CAPS_VER(name, 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", __VA_ARGS__) DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__)
# define DO_TEST_CAPS_ARCH_LATEST(name, arch) \ # define DO_TEST_CAPS_ARCH_LATEST(name, arch) \
DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END) DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END)
# define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \
DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END)
# define DO_TEST_CAPS_LATEST(name) \ # define DO_TEST_CAPS_LATEST(name) \
DO_TEST_CAPS_ARCH_LATEST(name, "x86_64") DO_TEST_CAPS_ARCH_LATEST(name, "x86_64")
# define DO_TEST_CAPS_VER(name, ver) \
DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver)
# define DO_TEST_CAPS_LATEST_FAILURE(name) \ # define DO_TEST_CAPS_LATEST_FAILURE(name) \
DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", \
ARG_FLAGS, FLAG_EXPECT_FAILURE) ARG_FLAGS, FLAG_EXPECT_FAILURE)
@ -735,7 +735,6 @@ mymain(void)
DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", \
ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR) ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR)
# define DO_TEST_FULL(name, ...) \ # define DO_TEST_FULL(name, ...) \
DO_TEST_INTERNAL(name, "", \ DO_TEST_INTERNAL(name, "", \
__VA_ARGS__, QEMU_CAPS_LAST) __VA_ARGS__, QEMU_CAPS_LAST)

View File

@ -207,7 +207,26 @@ mymain(void)
testQemuInfoClear(&info); \ testQemuInfoClear(&info); \
} while (0) } while (0)
# define NONE QEMU_CAPS_LAST # define DO_TEST_CAPS_INTERNAL(name, arch, ver, ...) \
DO_TEST_INTERNAL(name, "." arch "-" ver, WHEN_BOTH, \
ARG_CAPS_ARCH, arch, \
ARG_CAPS_VER, ver, \
__VA_ARGS__)
# define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \
DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__)
# define DO_TEST_CAPS_ARCH_LATEST(name, arch) \
DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END)
# define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \
DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END)
# define DO_TEST_CAPS_LATEST(name) \
DO_TEST_CAPS_ARCH_LATEST(name, "x86_64")
# define DO_TEST_CAPS_VER(name, ver) \
DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver)
# define DO_TEST_FULL(name, when, ...) \ # define DO_TEST_FULL(name, when, ...) \
DO_TEST_INTERNAL(name, "", when, __VA_ARGS__) DO_TEST_INTERNAL(name, "", when, __VA_ARGS__)
@ -216,27 +235,7 @@ mymain(void)
DO_TEST_FULL(name, WHEN_BOTH, \ DO_TEST_FULL(name, WHEN_BOTH, \
ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST)
# define DO_TEST_CAPS_INTERNAL(name, arch, ver, ...) \ # define NONE QEMU_CAPS_LAST
DO_TEST_INTERNAL(name, "." arch "-" ver, WHEN_BOTH, \
ARG_CAPS_ARCH, arch, \
ARG_CAPS_VER, ver, \
__VA_ARGS__)
# define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \
DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END)
# define DO_TEST_CAPS_VER(name, ver) \
DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver)
# define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \
DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__)
# define DO_TEST_CAPS_ARCH_LATEST(name, arch) \
DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END)
# define DO_TEST_CAPS_LATEST(name) \
DO_TEST_CAPS_ARCH_LATEST(name, "x86_64")
/* Unset or set all envvars here that are copied in qemudBuildCommandLine /* Unset or set all envvars here that are copied in qemudBuildCommandLine
* using ADD_ENV_COPY, otherwise these tests may fail due to unexpected * using ADD_ENV_COPY, otherwise these tests may fail due to unexpected