]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: use a common rule for checking augeas test data files
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 19 Jul 2019 16:23:29 +0000 (17:23 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 9 Aug 2019 13:05:06 +0000 (14:05 +0100)
Instead of each subdir containing its own custom rule for checking the
augeas tests, use common rule for all.

The new rule searches both src + build dirs for include files, since
some augeas files will be auto-generated very shortly.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/Makefile.am
src/bhyve/Makefile.inc.am
src/libxl/Makefile.inc.am
src/locking/Makefile.inc.am
src/logging/Makefile.inc.am
src/lxc/Makefile.inc.am
src/qemu/Makefile.inc.am
src/remote/Makefile.inc.am

index 2b5ac3914ea01cc9a7a36dfae8dfa5750b86201c..9eeef08b91ebb38727ca22022d0c8a58dd4bf4d5 100644 (file)
@@ -74,7 +74,6 @@ GENERATED_SYM_FILES =
 augeas_DATA =
 augeastest_DATA =
 conf_DATA =
-AUGEAS_DIRS =
 if WITH_DTRACE_PROBES
 tapset_DATA =
 endif WITH_DTRACE_PROBES
@@ -395,15 +394,20 @@ GENERATED_SYM_FILES += \
        $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \
               $< $(srcdir)/$(subst $(srcdir)/,,$@)
 
-
-
-
-
-
-
 check-local: check-augeas
 
-check-augeas: $(AUGEAS_DIRS:%=check-augeas-%)
+check-augeas: $(augeas_DATA) $(augeastest_DATA)
+       $(AM_V_GEN) \
+       if test -x "$(AUGPARSE)"; then \
+           for f in $(augeastest_DATA); do \
+               DIR=$$(dirname "$$f"); \
+               FILE=$$(basename "$$f"); \
+               "$(AUGPARSE)" \
+                   -I "$(srcdir)/$$DIR" -I "$(builddir)/$$DIR" \
+                   "$$DIR/$$FILE"; \
+           done; \
+       fi
+.PHONY: check-augeas
 
 AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
 
index 0aef5e17c74cc65ccdff1b9678188312b39f1a41..8b662e9775dd4a532456d9329beb234896dc0d68 100644 (file)
@@ -51,17 +51,10 @@ conf_DATA += bhyve/bhyve.conf
 augeas_DATA += bhyve/libvirtd_bhyve.aug
 augeastest_DATA += bhyve/test_libvirtd_bhyve.aug
 
-AUGEAS_DIRS += bhyve
-
 bhyve/test_libvirtd_bhyve.aug: bhyve/test_libvirtd_bhyve.aug.in \
                $(srcdir)/bhyve/bhyve.conf $(AUG_GENTEST)
        $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/bhyve/bhyve.conf $< > $@
 
-check-augeas-bhyve: bhyve/test_libvirtd_bhyve.aug
-       $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
-           '$(AUGPARSE)' -I $(srcdir)/bhyve bhyve/test_libvirtd_bhyve.aug; \
-       fi
-
 endif WITH_BHYVE
 
 EXTRA_DIST += \
@@ -69,7 +62,3 @@ EXTRA_DIST += \
        bhyve/libvirtd_bhyve.aug \
        bhyve/test_libvirtd_bhyve.aug.in \
        $(NULL)
-
-.PHONY: \
-       check-augeas-bhyve \
-       $(NULL)
index e73f34db8e400686ec8529cea198b631d6f2cc57..467c2720b2817e8b299c620435331f826d90f563 100644 (file)
@@ -69,17 +69,10 @@ conf_DATA += libxl/libxl.conf
 augeas_DATA += libxl/libvirtd_libxl.aug
 augeastest_DATA += libxl/test_libvirtd_libxl.aug
 
-AUGEAS_DIRS += libxl
-
 libxl/test_libvirtd_libxl.aug: libxl/test_libvirtd_libxl.aug.in \
                $(srcdir)/libxl/libxl.conf $(AUG_GENTEST)
        $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libxl/libxl.conf $< > $@
 
-check-augeas-libxl: libxl/test_libvirtd_libxl.aug
-       $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
-           '$(AUGPARSE)' -I $(srcdir)/libxl libxl/test_libvirtd_libxl.aug; \
-       fi
-
 INSTALL_DATA_DIRS += libxl
 
 install-data-libxl:
@@ -94,10 +87,6 @@ uninstall-data-libxl:
 
 endif WITH_LIBXL
 
-.PHONY: \
-       check-augeas-libxl \
-       $(NULL)
-
 EXTRA_DIST += \
        libxl/libxl.conf \
        libxl/libvirtd_libxl.aug \
index 0f284faf256f43216596685bd8d6fe5a879728a6..24d83fdd800d0a7e22eb5afc5fe48df8dd7303eb 100644 (file)
@@ -227,16 +227,8 @@ 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 $< > $@
 
-check-augeas-sanlock: locking/test_libvirt_sanlock.aug
-       $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
-           '$(AUGPARSE)' -I $(srcdir)/locking locking/test_libvirt_sanlock.aug; \
-       fi
-else ! WITH_QEMU
-check-augeas-sanlock:
-endif ! WITH_QEMU
-else ! WITH_SANLOCK
-check-augeas-sanlock:
-endif ! WITH_SANLOCK
+endif WITH_QEMU
+endif WITH_SANLOCK
 
 if WITH_QEMU
 locking/test_libvirt_lockd.aug: locking/test_libvirt_lockd.aug.in \
@@ -248,33 +240,11 @@ locking/test_virtlockd.aug: locking/test_virtlockd.aug.in \
                locking/virtlockd.conf $(AUG_GENTEST)
        $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/locking/virtlockd.conf $< > $@
 
-if WITH_QEMU
-check-augeas-lockd: locking/test_libvirt_lockd.aug
-       $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
-           '$(AUGPARSE)' -I $(srcdir)/locking locking/test_libvirt_lockd.aug; \
-       fi
-else ! WITH_QEMU
-check-augeas-lockd:
-endif ! WITH_QEMU
-
-check-augeas-virtlockd: locking/test_virtlockd.aug
-       $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
-           '$(AUGPARSE)' -I $(srcdir)/locking locking/test_virtlockd.aug; \
-       fi
-
-AUGEAS_DIRS += locking
-
-check-augeas-locking: check-augeas-virtlockd check-augeas-lockd check-augeas-sanlock
-
 endif WITH_LIBVIRTD
 
 .PHONY: \
        install-data-locking \
        uninstall-data-locking \
-       check-augeas-locking \
-       check-augeas-virtlockd \
-       check-augeas-lockd \
-       check-augeas-sanlock \
        $(NULL)
 
 locking/%-lockd.conf: $(srcdir)/locking/lockd.conf
index 58a139ec2fdae09f62cb8076dc4b3cbd812fc0be..f0c49330f5b0cbf54858551ae3b220eccd00f0e9 100644 (file)
@@ -101,17 +101,8 @@ logging/test_virtlogd.aug: logging/test_virtlogd.aug.in \
                logging/virtlogd.conf $(AUG_GENTEST)
        $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/logging/virtlogd.conf $< > $@
 
-AUGEAS_DIRS += logging
-
-check-augeas-logging: logging/test_virtlogd.aug
-       $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
-           '$(AUGPARSE)' -I $(srcdir)/logging logging/test_virtlogd.aug; \
-       fi
-
 endif WITH_LIBVIRTD
 
-.PHONY: check-augeas-logging
-
 logging/log_daemon_dispatch_stubs.h: $(LOG_PROTOCOL) \
                $(srcdir)/rpc/gendispatch.pl Makefile.am
        $(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \
index f011d90e95d39e11726ef05791c0f31d73e5ea26..0c241fc5c10ccfb5f66690816d0631b519c0b7b1 100644 (file)
@@ -158,17 +158,10 @@ conf_DATA += lxc/lxc.conf
 augeas_DATA += lxc/libvirtd_lxc.aug
 augeastest_DATA += lxc/test_libvirtd_lxc.aug
 
-AUGEAS_DIRS += lxc
-
 lxc/test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in \
                $(srcdir)/lxc/lxc.conf $(AUG_GENTEST)
        $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/lxc/lxc.conf $< > $@
 
-check-augeas-lxc: lxc/test_libvirtd_lxc.aug
-       $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
-           '$(AUGPARSE)' -I $(srcdir)/lxc lxc/test_libvirtd_lxc.aug; \
-       fi
-
 INSTALL_DATA_DIRS += lxc
 
 install-data-lxc:
@@ -196,7 +189,6 @@ lxc/lxc_controller_dispatch.h: $(srcdir)/rpc/gendispatch.pl \
          $(srcdir)/lxc/lxc_controller_dispatch.h
 
 .PHONY: \
-       check-agueas-lxc \
        install-data-lxc \
        uninstall-data-lxc \
        $(NULL)
index 750b8a5c850cecef7a44fc07c5ebd5e2c1e46906..12236a9e7b7d12b4ca87c1bc3a8494cd5105aafa 100644 (file)
@@ -117,17 +117,10 @@ conf_DATA += qemu/qemu.conf
 augeas_DATA += qemu/libvirtd_qemu.aug
 augeastest_DATA += qemu/test_libvirtd_qemu.aug
 
-AUGEAS_DIRS += qemu
-
 qemu/test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in \
                $(srcdir)/qemu/qemu.conf $(AUG_GENTEST)
        $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $< > $@
 
-check-augeas-qemu: qemu/test_libvirtd_qemu.aug
-       $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
-           '$(AUGPARSE)' -I $(srcdir)/qemu qemu/test_libvirtd_qemu.aug; \
-       fi
-
 INSTALL_DATA_DIRS += qemu
 
 install-data-qemu:
@@ -151,7 +144,6 @@ uninstall-data-qemu:
 endif WITH_QEMU
 
 .PHONY: \
-       check-augeas-qemu \
        install-data-qemu \
        uninstall-data-qemu \
        $(NULL)
index 18519b129d0236d8783b779b8d3f1ddab91ecacf..0400dabad96c67e60fee96543ffedeecbc2af541 100644 (file)
@@ -184,17 +184,10 @@ install-data-remote:
 uninstall-data-remote:
        rmdir "$(DESTDIR)$(localstatedir)/log/libvirt" ||:
 
-AUGEAS_DIRS += remote
-
 remote/test_libvirtd.aug: remote/test_libvirtd.aug.in \
                remote/libvirtd.conf $(AUG_GENTEST)
        $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/remote/libvirtd.conf $< > $@
 
-check-augeas-remote: remote/test_libvirtd.aug
-       $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
-           '$(AUGPARSE)' -I $(srcdir)/remote remote/test_libvirtd.aug; \
-       fi
-
 if WITH_SYSCTL
 # Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on
 # /usr/lib/sysctl.d/ even when libdir is /usr/lib64
@@ -241,7 +234,6 @@ endif WITH_LIBVIRTD
 .PHONY: \
        install-data-remote \
        uninstall-data-remote \
-       check-augeas-remote \
        $(NULL)
 
 # This is needed for clients too, so can't wrap in