diff --git a/ChangeLog b/ChangeLog index 305976cf73..6086350f6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Nov 26 12:03:00 UTC 2007 Richard W.M. Jones + + * tests/Makefile.am, tests/nodeinfotest.c, tests/qemuxml2argvtest.c, + tests/qemuxml2xmltest.c, tests/sexpr2xmltest.c, tests/virshtest.c, + tests/xencapstest.c, tests/xmconfigtest.c, tests/xml2sexprtest.c: + Miscellaneous fixes to the tests to compile under Cygwin. + Mon Nov 26 11:56:00 UTC 2007 Richard W.M. Jones * qemud/qemud.c: If AF_INET6 not defined, don't test for it. diff --git a/tests/Makefile.am b/tests/Makefile.am index d05940238c..512162bf5e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -70,63 +70,65 @@ xmlrpctest_SOURCES = \ @top_srcdir@/src/xmlrpc.c \ @top_srcdir@/src/xmlrpc.h -xmlrpctest_LDFLAGS = +LIBOBJDIR = ../src/ + +xmlrpctest_LDFLAGS = $(LIBOBJS) xmlrpctest_LDADD = $(LDADDS) xml2sexprtest_SOURCES = \ xml2sexprtest.c \ testutils.c testutils.h -xml2sexprtest_LDFLAGS = +xml2sexprtest_LDFLAGS = $(LIBOBJS) xml2sexprtest_LDADD = $(LDADDS) sexpr2xmltest_SOURCES = \ sexpr2xmltest.c \ testutils.c testutils.h -sexpr2xmltest_LDFLAGS = +sexpr2xmltest_LDFLAGS = $(LIBOBJS) sexpr2xmltest_LDADD = $(LDADDS) xmconfigtest_SOURCES = \ xmconfigtest.c \ testutils.c testutils.h -xmconfigtest_LDFLAGS = +xmconfigtest_LDFLAGS = $(LIBOBJS) xmconfigtest_LDADD = $(LDADDS) qemuxml2argvtest_SOURCES = \ qemuxml2argvtest.c \ testutils.c testutils.h -qemuxml2argvtest_LDFLAGS = +qemuxml2argvtest_LDFLAGS = $(LIBOBJS) qemuxml2argvtest_LDADD = $(LDADDS) qemuxml2xmltest_SOURCES = \ qemuxml2xmltest.c \ testutils.c testutils.h -qemuxml2xmltest_LDFLAGS = +qemuxml2xmltest_LDFLAGS = $(LIBOBJS) qemuxml2xmltest_LDADD = $(LDADDS) virshtest_SOURCES = \ virshtest.c \ testutils.c testutils.h -virshtest_LDFLAGS = +virshtest_LDFLAGS = $(LIBOBJS) virshtest_LDADD = $(LDADDS) conftest_SOURCES = \ conftest.c -conftest_LDFLAGS = +conftest_LDFLAGS = $(LIBOBJS) conftest_LDADD = $(LDADDS) xencapstest_SOURCES = \ xencapstest.c testutils.h testutils.c -xencapstest_LDFLAGS = +xencapstest_LDFLAGS = $(LIBOBJS) xencapstest_LDADD = $(LDADDS) nodeinfotest_SOURCES = \ nodeinfotest.c testutils.h testutils.c -nodeinfotest_LDFLAGS = +nodeinfotest_LDFLAGS = $(LIBOBJS) nodeinfotest_LDADD = $(LDADDS) reconnect_SOURCES = \ reconnect.c -reconnect_LDFLAGS = +reconnect_LDFLAGS = $(LIBOBJS) reconnect_LDADD = $(LDADDS) $(LIBVIRT): diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c index 8b22b71ba6..7275cc3fdd 100644 --- a/tests/nodeinfotest.c +++ b/tests/nodeinfotest.c @@ -1,7 +1,11 @@ +#include "config.h" + #include #include -#include "config.h" +#ifdef HAVE_SYS_SYSLIMITS_H +#include +#endif #include diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 052f3f31c9..966f67c324 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1,9 +1,19 @@ +#include "config.h" + #include +#include +#include #include #include #include +#ifdef HAVE_SYS_SYSLIMITS_H +#include +#endif + +#ifdef WITH_QEMU + #include "testutils.h" #include "qemu_conf.h" #include "internal.h" @@ -187,6 +197,12 @@ main(int argc, char **argv) exit(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE); } +#else + +int main (void) { exit (77); /* means 'test skipped' for automake */ } + +#endif /* WITH_QEMU */ + /* * Local variables: * indent-tabs-mode: nil diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 11d8239e86..a448ee244f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1,9 +1,19 @@ +#include "config.h" + #include +#include +#include #include #include #include +#ifdef HAVE_SYS_SYSLIMITS_H +#include +#endif + +#ifdef WITH_QEMU + #include "testutils.h" #include "qemu_conf.h" #include "internal.h" @@ -150,6 +160,12 @@ main(int argc, char **argv) exit(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE); } +#else + +int main (void) { exit (77); /* means 'test skipped' to automake */ } + +#endif /* WITH_QEMU */ + /* * Local variables: * indent-tabs-mode: nil diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index 99c8774cb6..3744801c38 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -1,6 +1,12 @@ +#include "config.h" + #include #include +#ifdef HAVE_SYS_SYSLIMITS_H +#include +#endif + #ifdef WITH_XEN #include "xml.h" #include "xend_internal.h" diff --git a/tests/virshtest.c b/tests/virshtest.c index e26ef5c95d..b58a4e3556 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -1,9 +1,14 @@ +#include "config.h" #include #include #include #include +#ifdef HAVE_SYS_SYSLIMITS_H +#include +#endif + #include "xml.h" #include "testutils.h" #include "internal.h" diff --git a/tests/xencapstest.c b/tests/xencapstest.c index 5744262bc5..bbf5976e2f 100644 --- a/tests/xencapstest.c +++ b/tests/xencapstest.c @@ -1,7 +1,11 @@ +#include "config.h" + #include #include -#include "config.h" +#ifdef HAVE_SYS_SYSLIMITS_H +#include +#endif #ifdef WITH_XEN diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index 10024b9ebb..4ed9eb1116 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -21,9 +21,15 @@ * */ +#include "config.h" + #include #include +#ifdef HAVE_SYS_SYSLIMITS_H +#include +#endif + #ifdef WITH_XEN #include "xen_unified.h" #include "xm_internal.h" diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c index 6ecf6b2470..608a861b99 100644 --- a/tests/xml2sexprtest.c +++ b/tests/xml2sexprtest.c @@ -1,9 +1,15 @@ +#include "config.h" + #include #include #include #include +#ifdef HAVE_SYS_SYSLIMITS_H +#include +#endif + #include "xml.h" #include "testutils.h" #include "internal.h"