From affd5008954f545b12874de8822f7df66532e6e4 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Fri, 10 Jul 2020 11:14:56 +0200 Subject: [PATCH] meson: tests: add test environment variables Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- 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 1756bb45fb..b2b49d3985 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 diff --git a/tests/meson.build b/tests/meson.build index d825526dc7..cc83159934 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@'.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: