mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
Build vircaps2xmltest and requirements only on Linux
The mock, as well as the test, is only available on Linux. So skip building it everywhere else, especially when it fails on mingw. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
0fc454cec0
commit
452f014abf
@ -192,7 +192,6 @@ test_programs = virshtest sockettest \
|
||||
domaincapstest \
|
||||
domainconftest \
|
||||
virhostdevtest \
|
||||
vircaps2xmltest \
|
||||
virnetdevtest \
|
||||
virtypedparamtest \
|
||||
$(NULL)
|
||||
@ -206,7 +205,6 @@ test_libraries = libshunload.la \
|
||||
virnetdevmock.la \
|
||||
virrandommock.la \
|
||||
virhostcpumock.la \
|
||||
virnumamock.la \
|
||||
domaincapsmock.la \
|
||||
$(NULL)
|
||||
|
||||
@ -225,8 +223,10 @@ endif WITH_REMOTE
|
||||
if WITH_LINUX
|
||||
test_programs += fchosttest
|
||||
test_programs += scsihosttest
|
||||
test_programs += vircaps2xmltest
|
||||
test_libraries += virusbmock.la \
|
||||
virnetdevbandwidthmock.la \
|
||||
virnumamock.la \
|
||||
virtestmock.la \
|
||||
$(NULL)
|
||||
endif WITH_LINUX
|
||||
@ -941,11 +941,6 @@ vircapstest_SOURCES += testutilsxen.c testutilsxen.h
|
||||
endif WITH_XEN
|
||||
vircapstest_LDADD = $(qemu_LDADDS) $(LDADDS)
|
||||
|
||||
vircaps2xmltest_SOURCES = \
|
||||
vircaps2xmltest.c testutils.h testutils.c
|
||||
vircaps2xmltest_LDADD = $(LDADDS)
|
||||
|
||||
|
||||
domaincapsmock_la_SOURCES = domaincapsmock.c
|
||||
domaincapsmock_la_CFLAGS = $(AM_CFLAGS)
|
||||
domaincapsmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
|
||||
@ -1125,11 +1120,19 @@ virhostcpumock_la_CFLAGS = $(AM_CFLAGS)
|
||||
virhostcpumock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
|
||||
virhostcpumock_la_LIBADD = $(MOCKLIBS_LIBS)
|
||||
|
||||
if WITH_LINUX
|
||||
vircaps2xmltest_SOURCES = \
|
||||
vircaps2xmltest.c testutils.h testutils.c
|
||||
vircaps2xmltest_LDADD = $(LDADDS)
|
||||
|
||||
virnumamock_la_SOURCES = \
|
||||
virnumamock.c
|
||||
virnumamock_la_CFLAGS = $(AM_CFLAGS)
|
||||
virnumamock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
|
||||
virnumamock_la_LIBADD = $(MOCKLIBS_LIBS)
|
||||
else ! WITH_LINUX
|
||||
EXTRA_DIST += vircaps2xmltest.c virnumamock.c
|
||||
endif ! WITH_LINUX
|
||||
|
||||
if WITH_NSS
|
||||
nsstest_SOURCES = \
|
||||
|
@ -30,8 +30,6 @@
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
struct virCapabilitiesData {
|
||||
const char *filename;
|
||||
virArch arch;
|
||||
@ -90,7 +88,7 @@ mymain(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
# define DO_TEST_FULL(filename, arch, offlineMigrate, liveMigrate) \
|
||||
#define DO_TEST_FULL(filename, arch, offlineMigrate, liveMigrate) \
|
||||
do { \
|
||||
struct virCapabilitiesData data = {filename, arch, \
|
||||
offlineMigrate, \
|
||||
@ -99,7 +97,7 @@ mymain(void)
|
||||
ret = -1; \
|
||||
} while (0)
|
||||
|
||||
# define DO_TEST(filename, arch) DO_TEST_FULL(filename, arch, true, true)
|
||||
#define DO_TEST(filename, arch) DO_TEST_FULL(filename, arch, true, true)
|
||||
|
||||
DO_TEST_FULL("basic", VIR_ARCH_X86_64, false, false);
|
||||
DO_TEST_FULL("basic", VIR_ARCH_AARCH64, true, false);
|
||||
@ -110,13 +108,3 @@ mymain(void)
|
||||
}
|
||||
|
||||
VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virnumamock.so")
|
||||
|
||||
#else /* !__linux__ */
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
return EXIT_AM_SKIP;
|
||||
}
|
||||
|
||||
#endif /* !__linux__ */
|
||||
|
Loading…
Reference in New Issue
Block a user