mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
meson: src: add check-augeas test
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
4d0e327b70
commit
c7029de306
@ -21,8 +21,6 @@
|
|||||||
# that actually use them.
|
# that actually use them.
|
||||||
|
|
||||||
BUILT_SOURCES =
|
BUILT_SOURCES =
|
||||||
augeas_DATA =
|
|
||||||
augeastest_DATA =
|
|
||||||
if WITH_DTRACE_PROBES
|
if WITH_DTRACE_PROBES
|
||||||
tapset_DATA =
|
tapset_DATA =
|
||||||
endif WITH_DTRACE_PROBES
|
endif WITH_DTRACE_PROBES
|
||||||
@ -92,21 +90,6 @@ check-local: check-protocol \
|
|||||||
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
|
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
|
||||||
|
|
||||||
|
|
||||||
check-local: 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" || exit 1; \
|
|
||||||
done; \
|
|
||||||
fi
|
|
||||||
.PHONY: check-augeas
|
|
||||||
|
|
||||||
if WITH_DTRACE_PROBES
|
if WITH_DTRACE_PROBES
|
||||||
|
|
||||||
BUILT_SOURCES += libvirt_functions.stp
|
BUILT_SOURCES += libvirt_functions.stp
|
||||||
|
@ -667,6 +667,12 @@ foreach data : virt_test_aug_files
|
|||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
# augeas_test_data:
|
||||||
|
# each entry is a dictionary with following items:
|
||||||
|
# * name: daemon name to run the test for (required)
|
||||||
|
# * file: test file to use (required)
|
||||||
|
augeas_test_data = []
|
||||||
|
|
||||||
foreach data : virt_daemon_confs
|
foreach data : virt_daemon_confs
|
||||||
capitalize_args = [ '-c', 'print("@0@".capitalize())'.format(data['name']) ]
|
capitalize_args = [ '-c', 'print("@0@".capitalize())'.format(data['name']) ]
|
||||||
name_uc = run_command(python3_prog, capitalize_args, check: true).stdout().strip()
|
name_uc = run_command(python3_prog, capitalize_args, check: true).stdout().strip()
|
||||||
@ -717,7 +723,7 @@ foreach data : virt_daemon_confs
|
|||||||
)
|
)
|
||||||
|
|
||||||
test_aug_out = 'test_@0@.aug'.format(data['name'])
|
test_aug_out = 'test_@0@.aug'.format(data['name'])
|
||||||
custom_target(
|
augeas_test_file = custom_target(
|
||||||
test_aug_out,
|
test_aug_out,
|
||||||
input: [ conf_out, test_aug_tmp ],
|
input: [ conf_out, test_aug_tmp ],
|
||||||
output: test_aug_out,
|
output: test_aug_out,
|
||||||
@ -729,6 +735,7 @@ foreach data : virt_daemon_confs
|
|||||||
install: true,
|
install: true,
|
||||||
install_dir: virt_test_aug_dir,
|
install_dir: virt_test_aug_dir,
|
||||||
)
|
)
|
||||||
|
augeas_test_data += { 'name': data['name'], 'file': augeas_test_file }
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
|
||||||
@ -886,3 +893,17 @@ test(
|
|||||||
args: [ check_aclrules_prog.path(), files('remote/remote_protocol.x'), stateful_driver_source_files ],
|
args: [ check_aclrules_prog.path(), files('remote/remote_protocol.x'), stateful_driver_source_files ],
|
||||||
env: runutf8,
|
env: runutf8,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if augparse_prog.found()
|
||||||
|
foreach data : augeas_test_data
|
||||||
|
test(
|
||||||
|
'check-augeas-@0@'.format(data['name']),
|
||||||
|
augparse_prog,
|
||||||
|
args: [
|
||||||
|
'-I', meson.current_source_dir(),
|
||||||
|
'-I', meson.current_build_dir(),
|
||||||
|
data['file'].full_path(),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user