* src/testutils.[ch]: make testDebug externally available
* src/testutilsqemu.c: if VIR_TEST_DEBUG is set, dump the qemu
driver capabilities to stderr
((((int) ((T)->tv_sec - (U)->tv_sec)) * 1000000.0 + \
((int) ((T)->tv_usec - (U)->tv_usec))) / 1000.0)
+unsigned int testDebug = 0;
+
static unsigned int testOOM = 0;
-static unsigned int testDebug = 0;
static unsigned int testCounter = 0;
double
return virtTestMain(argc,argv, func); \
}
+extern unsigned int testDebug;
+
#endif /* __VIT_TEST_UTILS_H__ */
#include <stdlib.h>
#include "testutilsqemu.h"
+#include "testutils.h"
+#include "memory.h"
virCapsPtr testQemuCapsInit(void) {
struct utsname utsname;
NULL) == NULL)
goto cleanup;
+ if (testDebug) {
+ char *caps_str;
+
+ caps_str = virCapabilitiesFormatXML(caps);
+ if (!caps_str)
+ goto cleanup;
+
+ fprintf(stderr, "QEMU driver capabilities:\n%s", caps_str);
+
+ VIR_FREE(caps_str);
+ }
+
return caps;
cleanup: