meson: tests: add test environment variables

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:
Pavel Hrdina 2020-07-10 11:14:56 +02:00
parent 9d8887fc80
commit affd500895
2 changed files with 15 additions and 12 deletions

View File

@ -295,18 +295,6 @@ noinst_LTLIBRARIES = $(test_libraries)
TESTS = $(test_programs) \
$(test_scripts)
VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT)
TESTS_ENVIRONMENT = \
abs_top_builddir="$(abs_top_builddir)" \
abs_top_srcdir="$(abs_top_srcdir)" \
abs_builddir="$(abs_builddir)" \
abs_srcdir="$(abs_srcdir)" \
LIBVIRT_AUTOSTART=0 \
LC_ALL=C \
VIR_TEST_EXPENSIVE=$(VIR_TEST_EXPENSIVE) \
$(VG)
VALGRIND = valgrind --quiet --leak-check=full --trace-children=yes \
--trace-children-skip="*/tools/virsh","*/tests/commandhelper","/usr/bin/*" \
--suppressions=$(abs_srcdir)/.valgrind.supp

View File

@ -29,6 +29,21 @@ tests_dep = declare_dependency(
link_args: libvirt_export_dynamic,
)
tests_env = [
'abs_builddir=@0@'.format(meson.current_build_dir()),
'abs_srcdir=@0@'.format(meson.current_source_dir()),
'abs_top_builddir=@0@'.format(meson.build_root()),
'abs_top_srcdir=@0@'.format(meson.source_root()),
'LC_ALL=C',
'LIBVIRT_AUTOSTART=0',
]
if use_expensive_tests
tests_env += 'VIR_TEST_EXPENSIVE=1'
else
tests_env += 'VIR_TEST_EXPENSIVE=0'
endif
# mock_libs:
# each entry is a dictionary with following items: