reconnect.c
reconnect_LDADD = $(LDADDS)
+statstest_SOURCES = \
+ statstest.c testutils.h testutils.c
+statstest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS)
+
else
EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \
xencapstest.c reconnect.c \
nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)
-statstest_SOURCES = \
- statstest.c testutils.h testutils.c
-statstest_LDADD = $(LDADDS)
-
if WITH_SECDRIVER_SELINUX
seclabeltest_SOURCES = \
seclabeltest.c
#include "xen/block_stats.h"
#include "testutils.h"
-#if WITH_XEN
static void testQuietError(void *userData ATTRIBUTE_UNUSED,
virErrorPtr error ATTRIBUTE_UNUSED)
{
/* nada */
}
-#endif
-#if __linux__ && WITH_XEN
static int testDevice(const char *path, int expect)
{
int actual = xenLinuxDomainDeviceID(NULL, 1, path);
return testDevice(info->dev, info->num);
}
-#endif
-
static int
mymain(int argc ATTRIBUTE_UNUSED,
char **argv ATTRIBUTE_UNUSED)
{
int ret = 0;
-#if __linux__ && WITH_XEN
/* Some of our tests delibrately test failure cases, so
* register a handler to stop error messages cluttering
* up display
if (!virTestGetDebug())
virSetErrorFunc(NULL, testQuietError);
-# define DO_TEST(dev, num) \
+#define DO_TEST(dev, num) \
do { \
struct testInfo info = { dev, num }; \
if (virtTestRun("Device " dev " -> " # num, \
DO_TEST("/dev/xvda1", 51713);
DO_TEST("/dev/xvda15", 51727);
-#endif
return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}