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

Re: [libvirt] [PATCH2 2/1] build: fix testing of augeas files in VPATH builds



On 05/30/2012 12:03 AM, Eric Blake wrote:
> Without this fix, a VPATH build (such as used by ./autobuild.sh)
> fails with messages like:
> 
> make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/daemon'
> ../../build-aux/augeas-gentest.pl libvirtd.conf ../../daemon/test_libvirtd.aug.in test_libvirtd.aug
> cannot read libvirtd.conf: No such file or directory at ../../build-aux/augeas-gentest.pl line 38.
> 
> * daemon/Makefile.am (AUG_GENTEST): Factor out definition.
> (test_libvirtd.aug): Look for correct file.
> * src/Makefile.am (AUG_GENTEST): Use $(PERL).
> (qemu/test_libvirtd_qemu.aug, lxc/test_libvirtd_lxc.aug)
> (locking/test_libvirt_sanlock.aug): Rename to avoid subdirectories.
> (check-augeas-qemu, check-augeas-lxc, check-augeas-sanlock): Reflect
> location of built tests.
> ---
> 
> Although this fixes a broken './autobuild.sh', I don't quite feel
> comfortable pushing it without a review.
> 
> v2: fix 'make check', not just 'make'
> v1 was at: https://www.redhat.com/archives/libvir-list/2012-May/msg01297.html
> 
>  daemon/Makefile.am |    8 +++++---
>  src/Makefile.am    |   32 ++++++++++++++++----------------
>  2 files changed, 21 insertions(+), 19 deletions(-)
> 
> diff --git a/daemon/Makefile.am b/daemon/Makefile.am
> index daf24ea..08e37a9 100644
> --- a/daemon/Makefile.am
> +++ b/daemon/Makefile.am
> @@ -351,12 +351,14 @@ libvirtd.service: libvirtd.service.in $(top_builddir)/config.status
> 
>  check-local: check-augeas
> 
> -test_libvirtd.aug: test_libvirtd.aug.in libvirtd.conf
> -	$(AM_V_GEN)$(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl libvirtd.conf $< $@
> +AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
> +
> +test_libvirtd.aug: test_libvirtd.aug.in $(srcdir)/libvirtd.conf
> +	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libvirtd.conf $< $@
> 
>  check-augeas: test_libvirtd.aug
>  	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
> -	  '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug; \
> +	  '$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \
>  	fi
> 
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index c8efa5b..b0f54b2 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1119,41 +1119,41 @@ check-local: check-augeas
> 
>  check-augeas: check-augeas-qemu check-augeas-lxc check-augeas-sanlock
> 
> -AUG_GENTEST = $(top_srcdir)/build-aux/augeas-gentest.pl
> +AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
> 
>  if WITH_QEMU
> -qemu/test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in qemu/qemu.conf $(AUG_GENTEST)
> -	$(AM_V_GEN)$(AUG_GENTEST) qemu/qemu.conf $< $@
> +test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in \
> +		$(srcdir)/qemu/qemu.conf $(AUG_GENTEST)
> +	$(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $< $@
> 
> -check-augeas-qemu: qemu/test_libvirtd_qemu.aug
> +check-augeas-qemu: test_libvirtd_qemu.aug
>  	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
> -	    '$(AUGPARSE)' -I $(srcdir)/qemu \
> -	    $(srcdir)/qemu/test_libvirtd_qemu.aug; \
> +	    '$(AUGPARSE)' -I $(srcdir)/qemu test_libvirtd_qemu.aug; \
>  	fi
>  else
>  check-augeas-qemu:
>  endif
> 
>  if WITH_LXC
> -lxc/test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in lxc/lxc.conf $(AUG_GENTEST)
> -	$(AM_V_GEN)$(AUG_GENTEST) lxc/lxc.conf $< $@
> +test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in \
> +		$(srcdir)/lxc/lxc.conf $(AUG_GENTEST)
> +	$(AUG_GENTEST) $(srcdir)/lxc/lxc.conf $< $@
> 
> -check-augeas-lxc: lxc/test_libvirtd_lxc.aug
> +check-augeas-lxc: test_libvirtd_lxc.aug
>  	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
> -	    '$(AUGPARSE)' -I $(srcdir)/lxc \
> -	    $(srcdir)/lxc/test_libvirtd_lxc.aug; \
> +	    '$(AUGPARSE)' -I $(srcdir)/lxc test_libvirtd_lxc.aug; \
>  	fi
>  else
>  check-augeas-lxc:
>  endif
> 
> -locking/test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in locking/qemu-sanlock.conf $(AUG_GENTEST)
> -	$(AM_V_GEN)$(AUG_GENTEST) locking/qemu-sanlock.conf $< $@
> +test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \
> +		locking/qemu-sanlock.conf $(AUG_GENTEST)
> +	$(AUG_GENTEST) locking/qemu-sanlock.conf $< $@
> 
> -check-augeas-sanlock: locking/test_libvirt_sanlock.aug
> +check-augeas-sanlock: test_libvirt_sanlock.aug
>  	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
> -	    '$(AUGPARSE)' -I $(srcdir)/locking \
> -	    $(srcdir)/locking/test_libvirt_sanlock.aug; \
> +	    '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \
>  	fi
> 
>  #

I'm not sure why you use "&& \" to join the lines when there is nothing
to share between the processes, but it doesn't hurt. Otherwise it looks
like nice cleanup, so ACK from me (if that's enough for you =) ).

Martin


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