diff --git a/ChangeLog b/ChangeLog index bb1bdf78cd47c8c59fd57e7b305d52fbcdafae33..98ecc9013bf79c3ffc2226d3769c9bc47c257427 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Mon Nov 24 19:22:40 GMT 2008 Dnaiel P. Berrange + + * tests/Makefile.am, tests/sexpr2xmltest.c, + tests/testutilsxen.c, tests/xencapstest.c, + tests/xmconfigtest.c, tests/xml2sexprtest.c: Disable all + Xen tests when Xen driver build is disabled. Remove unneccessary + WITH_XEN conditionals from source, since the entire build + is disabled in Makefile.am + Mon Nov 24 16:49:40 GMT 2008 Dnaiel P. Berrange * autobuild.sh: Disable UML driver on mingw32 biuld diff --git a/tests/Makefile.am b/tests/Makefile.am index 1efa0c83f6c9f48bf6922cb888d875e51aeb6720..9752cbf69e8edd2dd78977ba8558c4ebbb8b0e95 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -43,10 +43,13 @@ EXTRA_DIST = \ nodeinfodata \ domainschematest -noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \ - reconnect xmconfigtest xencapstest \ +noinst_PROGRAMS = xmlrpctest virshtest conftest \ nodeinfotest statstest qparamtest +if WITH_XEN +noinst_PROGRAMS += xml2sexprtest sexpr2xmltest \ + reconnect xmconfigtest xencapstest +endif if WITH_QEMU noinst_PROGRAMS += qemuxml2argvtest qemuxml2xmltest endif @@ -68,12 +71,22 @@ endif EXTRA_DIST += $(test_scripts) -TESTS = xml2sexprtest sexpr2xmltest virshtest xmconfigtest \ - xencapstest nodeinfotest \ - statstest qparamtest $(test_scripts) +TESTS = virshtest \ + nodeinfotest \ + statstest \ + qparamtest \ + $(test_scripts) + +if WITH_XEN +TESTS += xml2sexprtest \ + sexpr2xmltest \ + xmconfigtest \ + xencapstest if ENABLE_XEN_TESTS - TESTS += reconnect +TESTS += reconnect +endif endif + if WITH_QEMU TESTS += qemuxml2argvtest qemuxml2xmltest endif @@ -105,6 +118,7 @@ xmlrpctest_SOURCES = \ xmlrpctest_LDADD = $(LDADDS) +if WITH_XEN xml2sexprtest_SOURCES = \ xml2sexprtest.c testutilsxen.c testutilsxen.h \ testutils.c testutils.h @@ -120,6 +134,20 @@ xmconfigtest_SOURCES = \ testutils.c testutils.h xmconfigtest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS) +xencapstest_SOURCES = \ + xencapstest.c testutils.h testutils.c +xencapstest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS) + +reconnect_SOURCES = \ + reconnect.c +reconnect_LDADD = $(LDADDS) + +else +EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \ + xencapstest.c reconnect.c \ + testutilsxen.c testutilsxen.h +endif + if WITH_QEMU qemuxml2argvtest_SOURCES = \ qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \ @@ -143,10 +171,6 @@ conftest_SOURCES = \ conftest.c conftest_LDADD = $(LDADDS) -xencapstest_SOURCES = \ - xencapstest.c testutils.h testutils.c -xencapstest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS) - nodeinfotest_SOURCES = \ nodeinfotest.c testutils.h testutils.c nodeinfotest_LDADD = $(LDADDS) @@ -159,8 +183,4 @@ qparamtest_SOURCES = \ qparamtest.c testutils.h testutils.c qparamtest_LDADD = $(LDADDS) -reconnect_SOURCES = \ - reconnect.c -reconnect_LDADD = $(LDADDS) - CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index d36bc72fea17334cffc625bba6b7b8129a79b2a3..9e8bac4480cf80c6026d808246f5f414cb02f104 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -4,8 +4,6 @@ #include #include -#ifdef WITH_XEN - #include "internal.h" #include "xml.h" #include "xend_internal.h" @@ -146,11 +144,3 @@ mymain(int argc, char **argv) VIRT_TEST_MAIN(mymain) -#else /* WITHOUT_XEN */ -int -main(void) -{ - fprintf(stderr, "libvirt compiled without Xen support\n"); - return(0); -} -#endif /* WITH_XEN */ diff --git a/tests/testutilsxen.c b/tests/testutilsxen.c index a16d91291f915413eaf3aa9ef4711cdfa15d689f..7685bd2cde1543b4f9b6a1bfa525f3c011354016 100644 --- a/tests/testutilsxen.c +++ b/tests/testutilsxen.c @@ -1,6 +1,5 @@ #include -#ifdef WITH_XEN #include #include @@ -52,4 +51,3 @@ cleanup: virCapabilitiesFree(caps); return NULL; } -#endif diff --git a/tests/xencapstest.c b/tests/xencapstest.c index 1c173d3b4e371b8420a29080709d1cfe67d90b64..24b338ffaf26fbb1378c55ec199972400cb23aa3 100644 --- a/tests/xencapstest.c +++ b/tests/xencapstest.c @@ -5,8 +5,6 @@ #include #include -#ifdef WITH_XEN - #include "internal.h" #include "xml.h" #include "testutils.h" @@ -225,12 +223,3 @@ mymain(int argc, char **argv) VIRT_TEST_MAIN(mymain) -#else /* !WITH_XEN */ - -int -main (void) -{ - exit (EXIT_SUCCESS); -} - -#endif /* !WITH_XEN */ diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index b88637f1c5424636f37882bd01e505fd861b782c..0577da5ae6b0dffffd935b0711761925e62dc8d8 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -27,8 +27,6 @@ #include #include -#ifdef WITH_XEN - #include "internal.h" #include "datatypes.h" #include "xen_unified.h" @@ -239,11 +237,3 @@ mymain(int argc, char **argv) VIRT_TEST_MAIN(mymain) -#else /* WITHOUT_XEN */ -int -main(void) -{ - fprintf(stderr, "libvirt compiled without Xen support\n"); - return(0); -} -#endif /* WITH_XEN */ diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c index aee006a7cc0f11463201455a14e639c134b98be5..b05e6c8d6643ae31003e6dab79e304d23251d418 100644 --- a/tests/xml2sexprtest.c +++ b/tests/xml2sexprtest.c @@ -8,8 +8,6 @@ #include #include -#if WITH_XEN - #include "internal.h" #include "xend_internal.h" #include "testutils.h" @@ -155,8 +153,3 @@ mymain(int argc, char **argv) VIRT_TEST_MAIN(mymain) -#else /* WITH_XEN */ - -int main (void) { exit (77); /* means 'test skipped' for automake */ } - -#endif /* ! WITH_XEN */