On 07/08/2011 05:28 PM, Matthias Bolte wrote:
From a1508239af921289cd6e357e8521ff42faf535bd Mon Sep 17 00:00:00 2001
From: Matthias Bolte <matthias.bolte(a)googlemail.com>
Date: Sat, 9 Jul 2011 01:24:16 +0200
Subject: [PATCH] tests: Add the logic to skip the statstest to the right place
---
tests/statstest.c | 31 ++++++++++++++++++++-----------
1 files changed, 20 insertions(+), 11 deletions(-)
-VIRT_TEST_MAIN(mymain)
+/* Skipping the test in mymain is too late, it results in broken output.
+ * Therefore, expand VIRT_TEST_MAIN here manually to be able to skip at
+ * the right place. */
+int main(int argc, char **argv)
This seems fishy. Why did tests/reconnect.c not need the same
treatment? Oh, because it didn't use VIRT_TEST_MAIN.
Wouldn't it be better to teach VIRT_TEST_MAIN to behave better on a skip?
diff --git i/tests/testutils.c w/tests/testutils.c
index b433204..f732fdd 100644
--- i/tests/testutils.c
+++ w/tests/testutils.c
@@ -688,7 +688,7 @@ cleanup:
if (abs_srcdir_cleanup)
VIR_FREE(abs_srcdir);
virResetLastError();
- if (!virTestGetVerbose()) {
+ if (!virTestGetVerbose() && ret != EXIT_AM_SKIP) {
int i;
for (i = (testCounter % 40) ; i > 0 && i < 40 ; i++)
fprintf(stderr, " ");
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org