Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
tests/Makefile.am | 12 ------------
tests/meson.build | 15 +++++++++++++++
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5591c999f11..fc48527792b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -300,18 +300,6 @@ endif ! WITH_TESTS
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
diff --git a/tests/meson.build b/tests/meson.build
index d825526dc78..cc83159934f 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -29,6 +29,21 @@ tests_dep = declare_dependency(
link_args: libvirt_export_dynamic,
)
+tests_env = [
+ 'abs_builddir=@0(a)'.format(meson.current_build_dir()),
+ 'abs_srcdir=@0(a)'.format(meson.current_source_dir()),
+ 'abs_top_builddir=@0(a)'.format(meson.build_root()),
+ 'abs_top_srcdir=@0(a)'.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:
--
2.26.2