mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 12:25:52 +00:00
virjsontest: store name in testInfo
Give the testing function access to the test name instead of only passing it to virTestRun. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
2de3df854a
commit
020382b298
@ -12,6 +12,7 @@
|
|||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
struct testInfo {
|
struct testInfo {
|
||||||
|
const char *name;
|
||||||
const char *doc;
|
const char *doc;
|
||||||
const char *expect;
|
const char *expect;
|
||||||
bool pass;
|
bool pass;
|
||||||
@ -481,7 +482,7 @@ mymain(void)
|
|||||||
|
|
||||||
#define DO_TEST_FULL(name, cmd, doc, expect, pass) \
|
#define DO_TEST_FULL(name, cmd, doc, expect, pass) \
|
||||||
do { \
|
do { \
|
||||||
struct testInfo info = { doc, expect, pass }; \
|
struct testInfo info = { name, doc, expect, pass }; \
|
||||||
if (virTestRun(name, testJSON ## cmd, &info) < 0) \
|
if (virTestRun(name, testJSON ## cmd, &info) < 0) \
|
||||||
ret = -1; \
|
ret = -1; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
Loading…
Reference in New Issue
Block a user