mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
src/meson: add missing augeas tests
Most of our augeas files are generated during meson setup into build directory and we were running augeas tests only for these files. However, we have some other augeas and config files that are not modified during meson setup and they are only in source directories. In order to run tests for these files we need to provide different path to both source and build directories. Reported-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
055cac9c5f
commit
e72a4a7f01
@ -53,6 +53,9 @@ if conf.has('WITH_BHYVE')
|
||||
'name': 'test_libvirtd_bhyve.aug',
|
||||
'aug': files('test_libvirtd_bhyve.aug.in'),
|
||||
'conf': files('bhyve.conf'),
|
||||
'test_name': 'libvirtd_bhyve',
|
||||
'test_srcdir': meson.current_source_dir(),
|
||||
'test_builddir': meson.current_build_dir(),
|
||||
}
|
||||
|
||||
virt_daemon_confs += {
|
||||
|
@ -54,6 +54,9 @@ if conf.has('WITH_LIBXL')
|
||||
'name': 'test_libvirtd_libxl.aug',
|
||||
'aug': files('test_libvirtd_libxl.aug.in'),
|
||||
'conf': files('libxl.conf'),
|
||||
'test_name': 'libvirtd_libxl',
|
||||
'test_srcdir': meson.current_source_dir(),
|
||||
'test_builddir': meson.current_build_dir(),
|
||||
}
|
||||
|
||||
virt_daemon_confs += {
|
||||
|
@ -186,6 +186,9 @@ if conf.has('WITH_LIBVIRTD')
|
||||
'name': 'test_libvirt_lockd.aug',
|
||||
'aug' : files('test_libvirt_lockd.aug.in'),
|
||||
'conf': qemu_lockd_conf,
|
||||
'test_name': 'libvirt_lockd',
|
||||
'test_srcdir': meson.current_source_dir(),
|
||||
'test_builddir': meson.current_build_dir(),
|
||||
}
|
||||
endif
|
||||
|
||||
@ -212,6 +215,9 @@ if conf.has('WITH_LIBVIRTD')
|
||||
'name': 'test_libvirt_sanlock.aug',
|
||||
'aug' : files('test_libvirt_sanlock.aug.in'),
|
||||
'conf': qemu_sanlock_conf,
|
||||
'test_name': 'libvirt_sanlock',
|
||||
'test_srcdir': meson.current_source_dir(),
|
||||
'test_builddir': meson.current_build_dir(),
|
||||
}
|
||||
endif
|
||||
|
||||
@ -231,6 +237,9 @@ if conf.has('WITH_LIBVIRTD')
|
||||
'name': 'test_virtlockd.aug',
|
||||
'aug': files('test_virtlockd.aug.in'),
|
||||
'conf': files('virtlockd.conf'),
|
||||
'test_name': 'virtlockd',
|
||||
'test_srcdir': meson.current_source_dir(),
|
||||
'test_builddir': meson.current_build_dir(),
|
||||
}
|
||||
|
||||
virt_install_dirs += [
|
||||
|
@ -77,6 +77,9 @@ if conf.has('WITH_LIBVIRTD')
|
||||
'name': 'test_virtlogd.aug',
|
||||
'aug': files('test_virtlogd.aug.in'),
|
||||
'conf': files('virtlogd.conf'),
|
||||
'test_name': 'virtlogd',
|
||||
'test_srcdir': meson.current_source_dir(),
|
||||
'test_builddir': meson.current_build_dir(),
|
||||
}
|
||||
|
||||
virt_daemon_units += {
|
||||
|
@ -154,6 +154,9 @@ if conf.has('WITH_LXC')
|
||||
'name': 'test_libvirtd_lxc.aug',
|
||||
'aug': files('test_libvirtd_lxc.aug.in'),
|
||||
'conf': files('lxc.conf'),
|
||||
'test_name': 'libvirtd_lxc',
|
||||
'test_srcdir': meson.current_source_dir(),
|
||||
'test_builddir': meson.current_build_dir(),
|
||||
}
|
||||
|
||||
virt_daemon_confs += {
|
||||
|
@ -173,6 +173,9 @@ virt_aug_files = []
|
||||
# * name - augeas test file name (required)
|
||||
# * aug - augeas test file source (required)
|
||||
# * conf - conf file (required)
|
||||
# * test_name: name for the check-augeas test (required)
|
||||
# * test_srcdir: path to source dir with aug files (required)
|
||||
# * test_builddir: path to build dir with aug files (required)
|
||||
virt_test_aug_files = []
|
||||
|
||||
# virt_daemon_confs:
|
||||
@ -670,8 +673,16 @@ virt_conf_files += 'libvirt.conf'
|
||||
install_data(virt_conf_files, install_dir: confdir)
|
||||
install_data(virt_aug_files, install_dir: virt_aug_dir)
|
||||
|
||||
# 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)
|
||||
# * srcdir: path to source dir with aug files (required)
|
||||
# * builddir: path to build dir with aug files (required)
|
||||
augeas_test_data = []
|
||||
|
||||
foreach data : virt_test_aug_files
|
||||
custom_target(
|
||||
augeas_test_file = custom_target(
|
||||
data['name'],
|
||||
input: [ data['conf'], data['aug'] ],
|
||||
output: data['name'],
|
||||
@ -683,16 +694,14 @@ foreach data : virt_test_aug_files
|
||||
install: true,
|
||||
install_dir: virt_test_aug_dir,
|
||||
)
|
||||
augeas_test_data += {
|
||||
'name': data['test_name'],
|
||||
'file': augeas_test_file,
|
||||
'srcdir': data['test_srcdir'],
|
||||
'builddir': data['test_builddir'],
|
||||
}
|
||||
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)
|
||||
# * srcdir: path to source dir with aug files (required)
|
||||
# * builddir: path to build dir with aug files (required)
|
||||
augeas_test_data = []
|
||||
|
||||
foreach data : virt_daemon_confs
|
||||
capitalize_args = [ '-c', 'print("@0@".capitalize())'.format(data['name']) ]
|
||||
name_uc = run_command(python3_prog, capitalize_args, check: true).stdout().strip()
|
||||
|
@ -132,6 +132,9 @@ if conf.has('WITH_QEMU')
|
||||
'name': 'test_libvirtd_qemu.aug',
|
||||
'aug': files('test_libvirtd_qemu.aug.in'),
|
||||
'conf': files('qemu.conf'),
|
||||
'test_name': 'libvirtd_qemu',
|
||||
'test_srcdir': meson.current_source_dir(),
|
||||
'test_builddir': meson.current_build_dir(),
|
||||
}
|
||||
|
||||
virt_helpers += {
|
||||
|
Loading…
x
Reference in New Issue
Block a user