提交 2ffbdabb 编写于 作者: D Daniel P. Berrangé

build: use a common rule for checking augeas test data files

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: NAndrea Bolognani <abologna@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 2cdabb17
......@@ -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
......
......@@ -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)
......@@ -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 \
......
......@@ -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
......
......@@ -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 \
......
......@@ -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)
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册