aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/unit/meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 0d3f00ba5..c3eefeede 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
@@ -241,6 +241,10 @@ test(
# No special meaning here, it's just a file laying around that is unlikely to go anywhere
# any time soon.
'_NIX_TEST_UNIT_DATA': meson.project_source_root() / 'src/nix-env/buildenv.nix',
+ # Use a temporary home directory for the unit tests.
+ # Otherwise, /homeless-shelter is created in the single-user sandbox, and functional tests will fail.
+ # TODO(alois31): handle TMPDIR properly (meson can't, and setting HOME in the test is too late)…
+ 'HOME': '/tmp/nix-test/libcmd-unit-tests',
},
suite : 'check',
protocol : 'gtest',