tests: Add support for skipping tests

AM_TESTS has support for skipping tests, while the C-implementation
virtTestRun() does not support that feature.

Print "_" or "SKIP" in verbose mode for tests returning EXIT_AM_SKIP=77.

Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
Philipp Hahn 2011-10-12 10:08:33 +02:00 committed by Eric Blake
parent da8127e6b3
commit c58d778d73

View File

@ -160,6 +160,8 @@ virtTestRun(const char *title, int nloops, int (*body)(const void *data), const
virtTestCountAverage(ts, nloops));
else if (ret == 0)
fprintf(stderr, "OK\n");
else if (ret == EXIT_AM_SKIP)
fprintf(stderr, "SKIP\n");
else
fprintf(stderr, "FAILED\n");
} else {
@ -170,6 +172,8 @@ virtTestRun(const char *title, int nloops, int (*body)(const void *data), const
}
if (ret == 0)
fprintf(stderr, ".");
else if (ret == EXIT_AM_SKIP)
fprintf(stderr, "_");
else
fprintf(stderr, "!");
}