[libvirt] [PATCH] build: skip qemu in tests when !WITH_QEMU

A mingw build (where the qemu driver is not built, so WITH_QEMU is undefined) failed with: In file included from ../../src/qemu/qemu_command.h:30:0, from ../../tests/testutilsqemu.h:4, from ../../tests/networkxml2xmltest.c:14: ../../src/qemu/qemu_conf.h:53:4: error: #error "Port me" But since testutilsqemu.c is already conditional, the header should be likewise. * tests/testutilsqemu.h: Make content conditional. Signed-off-by: Eric Blake <eblake@redhat.com> --- Pushing under the build-breaker rule. I'm getting closer to a clean ./autobuild.sh run. tests/testutilsqemu.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index 2ca42ab..fc2f5bd 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -1,8 +1,11 @@ +#include <config.h> +#ifdef WITH_QEMU -#include "capabilities.h" -#include "domain_conf.h" -#include "qemu/qemu_command.h" +# include "capabilities.h" +# include "domain_conf.h" +# include "qemu/qemu_command.h" virCapsPtr testQemuCapsInit(void); virDomainXMLOptionPtr testQemuXMLConfInit(void); extern qemuBuildCommandLineCallbacks testCallbacks; +#endif -- 1.8.1.4

On 05/31/2013 10:50 AM, Eric Blake wrote:
* tests/testutilsqemu.h: Make content conditional.
Signed-off-by: Eric Blake <eblake@redhat.com> ---
Pushing under the build-breaker rule. I'm getting closer to a clean ./autobuild.sh run.
tests/testutilsqemu.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index 2ca42ab..fc2f5bd 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -1,8 +1,11 @@ +#include <config.h>
Oops, I violated my own rule (but fixed it before pushing) - config.h should never be included from another .h file, because all .c files should have included it first. Sounds like I need to write a syntax check... -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (1)
-
Eric Blake