diff --git a/.gitignore b/.gitignore index 50ff3bf7d2e2f5544ab1554cb785fe60ff3e8c84..d535398622dc0961cb86b53492ece2760147e040 100644 --- a/.gitignore +++ b/.gitignore @@ -109,6 +109,7 @@ /src/remote/*_protocol.[ch] /src/rpc/virkeepaliveprotocol.[ch] /src/rpc/virnetprotocol.[ch] +/src/test_libvirt*.aug /src/util/virkeymaps.h /src/virt-aa-helper /tests/*.log diff --git a/configure.ac b/configure.ac index 59962c5133e02f5f01703b67bd4f3b3700df48f4..7d8d26b1e60081bdff8ae47f6e60c13bfc8fa98d 100644 --- a/configure.ac +++ b/configure.ac @@ -2243,6 +2243,9 @@ AM_CONDITIONAL([WITH_PYTHON], [test "$with_python" = "yes"]) AC_SUBST([PYTHON_VERSION]) AC_SUBST([PYTHON_INCLUDES]) +dnl Allow perl overrides +AC_PATH_PROG([PERL], [perl]) + AC_ARG_ENABLE([with-test-suite], AC_HELP_STRING([--with-test-suite], [build test suite by default @<:@default=check@:>@]), [case "${withval}" in diff --git a/daemon/Makefile.am b/daemon/Makefile.am index daf24ea48ac05f53c0b47f7c79f5486e90f23bdb..08e37a9db758b83471df034888ea014ee967de60 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 1fde93697175c6e11f58917502de8ea7f7ba6bd1..d7beea6a11ace148424a96f084639cf84a3a51ef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -782,8 +782,8 @@ libvirt_driver_qemu_impl_la_SOURCES = $(QEMU_DRIVER_SOURCES) conf_DATA += qemu/qemu.conf augeas_DATA += qemu/libvirtd_qemu.aug -augeastest_DATA += qemu/test_libvirtd_qemu.aug -CLEANFILES += qemu/test_libvirtd_qemu.aug +augeastest_DATA += test_libvirtd_qemu.aug +CLEANFILES += test_libvirtd_qemu.aug endif EXTRA_DIST += qemu/qemu.conf qemu/libvirtd_qemu.aug \ @@ -823,8 +823,8 @@ libvirt_driver_lxc_impl_la_SOURCES = $(LXC_DRIVER_SOURCES) conf_DATA += lxc/lxc.conf augeas_DATA += lxc/libvirtd_lxc.aug -augeastest_DATA += lxc/test_libvirtd_lxc.aug -CLEANFILES += lxc/test_libvirtd_lxc.aug +augeastest_DATA += test_libvirtd_lxc.aug +CLEANFILES += test_libvirtd_lxc.aug endif EXTRA_DIST += lxc/lxc.conf lxc/libvirtd_lxc.aug lxc/test_libvirtd_lxc.aug.in @@ -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 # @@ -1357,8 +1357,8 @@ sanlock_la_LIBADD = -lsanlock_client \ ../gnulib/lib/libgnu.la augeas_DATA += locking/libvirt_sanlock.aug -augeastest_DATA += locking/test_libvirt_sanlock.aug -CLEANFILES += locking/test_libvirt_sanlock.aug +augeastest_DATA += test_libvirt_sanlock.aug +CLEANFILES += test_libvirt_sanlock.aug $(builddir)/locking/%-sanlock.conf: $(srcdir)/locking/sanlock.conf $(AM_V_GEN)$(MKDIR_P) locking ; \