diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-02 20:21:29 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-06 10:56:54 +0200 |
commit | 38db5eff344dcc97739be2ee4696f02eae1555dd (patch) | |
tree | f5f11f91594e5eefee9cc5ffb2cb654019f72f1f /test/meson.build | |
parent | mkosi: Add dependency to system image on minimal-base (diff) | |
download | systemd-38db5eff344dcc97739be2ee4696f02eae1555dd.tar.xz systemd-38db5eff344dcc97739be2ee4696f02eae1555dd.zip |
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.
Diffstat (limited to 'test/meson.build')
-rw-r--r-- | test/meson.build | 8 |
1 files changed, 7 insertions, 1 deletions
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') |