[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Compilation Errors



Jim Meyering <jim meyering net> wrote:
> If being able to build --without-lxc --without-qemu --with-network
> is important, (even if just to forestall bug reports like this one ;-)
> then we'll make it work.

If it's worth building, then it's worth making "make check" pass, too.
And without the following, the daemon-conf test would fail with
many diagnostics like this:

  testing with corrupted config: listen_addr
  testing with corrupted config: mdns_adv
  --- expected-err        2009-02-16 11:57:10.000000000 +0100
  +++ err 2009-02-16 11:57:10.000000000 +0100
  @@ -1,2 +1,2 @@
  -remoteReadConfigFile: in6.conf: mdns_adv: invalid type: got string; expected long
  +remoteReadConfigFile: in6.conf: auth_tcp: unsupported auth sasl

Here's the patch:

>From 4ea57562ab66302d593c1877cbdf67b9251feb52 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Mon, 16 Feb 2009 12:11:04 +0100
Subject: [PATCH] don't fail daemon-conf test when configured --without-qemu

* tests/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
* tests/daemon-conf: Use test-lib.sh.
Skip this test when configured --without-qemu.
---
 tests/Makefile.am |    1 +
 tests/daemon-conf |   16 ++++++----------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index e467a86..877884f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -120,6 +120,7 @@ TESTS_ENVIRONMENT =				\
   abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
   abs_builddir=`cd '$(builddir)'; pwd`		\
   abs_srcdir=`cd '$(srcdir)'; pwd`		\
+  CONFIG_HEADER='$(abs_top_builddir)/lib/config.h' \
   PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"	\
   SHELL="$(SHELL)"				\
   LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \
diff --git a/tests/daemon-conf b/tests/daemon-conf
index b357c39..7a53eff 100755
--- a/tests/daemon-conf
+++ b/tests/daemon-conf
@@ -6,16 +6,12 @@ if test "$VERBOSE" = yes; then
   libvirtd --version
 fi

-# Boilerplate code to set up a test directory, cd into it,
-# and to ensure we remove it upon completion.
-this_test_() { echo "./$0" | sed 's,.*/,,'; }
-t_=$(this_test_)-$$
-init_cwd_=$(pwd)
-trap 'st=$?; d='"$t_"';
-    cd '"$init_cwd_"' && chmod -R u+rwx "$d" && rm -rf "$d" && exit $st' 0
-trap '(exit $?); exit $?' 1 2 13 15
-mkdir "$t_" || fail=1
-cd "$t_" || fail=1
+test -z "$srcdir" && srcdir=$(pwd)
+test -z "$abs_top_srcdir" && abs_top_srcdir=$(pwd)/..
+. $srcdir/test-lib.sh
+
+grep '^#define WITH_QEMU 1' $CONFIG_HEADER > /dev/null ||
+  skip_test_ "configured without QEMU support"

 conf="$abs_top_srcdir/qemud/libvirtd.conf"

--
1.6.2.rc0.264.g60787


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]