From 89de8dd7e1575a0e3d3e4bfb625059e3b181748b Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sun, 4 Mar 2018 19:08:34 +0100 Subject: [PATCH] Run tests with HOME unset again --- tests/meson.build | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index 9fcca8b..178fed3 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -34,7 +34,13 @@ if check.found() env.set('HOME', '/home/test') test('tests-with-home', tests, env: env) - # Cannot unset environment variables. - # env.unset('HOME') - # test('tests-without-home', tests, env: env) + env_bin = find_program('env', required: false) + if env_bin.found() + env = environment() + env.set('XDG_TEST_HELPER_PATH', meson.current_build_dir()) + + test('tests-without-home', env_bin, + args: ['-u', 'HOME', tests], + env: env) + endif endif -- 2.26.2