]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: avoid ld_preload tests on mingw v1.2.2-rc2
authorEric Blake <eblake@redhat.com>
Wed, 26 Feb 2014 00:24:58 +0000 (17:24 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 26 Feb 2014 01:51:11 +0000 (18:51 -0700)
commitf2dc1f67043eb18f781d3016d4a3ea38eb72836a
treec096e6cbeb1262d4723f17707f668c17d2099b8b
parentfa2e4dbfd66409a1f338dcc7a46e276f0b57b1b1
build: avoid ld_preload tests on mingw

Running ./autobuild.sh complained during the mingw cross-compile:

  CC       libvirportallocatormock_la-virportallocatortest.lo
../../tests/virportallocatortest.c:32:20: fatal error: dlfcn.h: No such file or directory
 # include <dlfcn.h>
                    ^
compilation terminated.  With that fixed, the next failure was:

  CCLD     qemuxml2argvmock.la
libtool: link: libtool library `qemuxml2argvmock.la' must begin with `lib'
libtool: link: Try `libtool --help --mode=link' for more information.

While we don't need to limit all LD_PRELOAD tests to just Linux, we
do need to limit them to platforms that actually support loading;
we also need to avoid building qemu tests when qemu is not enabled.

* tests/virportallocatortest.c: Make conditional on <dlfcn.h>.
* tests/Makefile.am (test_libraries): Only build qemu mock library
when building qemu tests.

Signed-off-by: Eric Blake <eblake@redhat.com>
tests/Makefile.am
tests/virportallocatortest.c