From 38db5eff344dcc97739be2ee4696f02eae1555dd Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 2 May 2024 20:21:29 +0200 Subject: test: Only set environment variable if integration tests are enabled. If we set it to '0' if integration tests are not enabled then we can't enable them from the command line since environment from meson takes priority over environment variables from the command line. We also rename the related variables to avoid conflicts with the existing integration_tests variable. --- test/meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/meson.build') diff --git a/test/meson.build b/test/meson.build index c4f4057e59..f93137c07a 100644 --- a/test/meson.build +++ b/test/meson.build @@ -431,12 +431,18 @@ foreach test_number, dirname : integration_tests '--', ] + test_params['mkosi_args'] + integration_test_env = {} + + if want_integration_tests + integration_test_env = {'SYSTEMD_INTEGRATION_TESTS': '1'} + endif + # We don't explicitly depend on the "mkosi" target because that means the image is rebuilt # on every "ninja -C build". Instead, the mkosi target has to be rebuilt manually before # running the integration tests with mkosi. test(dirname, integration_test_wrapper, - env : test_env, + env : integration_test_env, args : args, timeout : test_params['timeout'], suite : 'integration-tests') -- cgit v1.2.3