aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoralois31 <alois1@gmx-topmail.de>2024-06-13 05:27:55 +0000
committerGerrit Code Review <gerrit@localhost>2024-06-13 05:27:55 +0000
commit1d6fd94cf9354c2d9dbeb9318532fbcbfe308e39 (patch)
treeb2afa21b4cd76fb5c3b73b36acfee98b45c49623 /tests
parentd0b28f0e7429cbde81e881c7fda51df6ee0819b0 (diff)
parent3c0434999e28f34c047b51fa3768d68ed88fb0ed (diff)
Merge "tests/libcmd: set HOME to a temporary directory" into main
Diffstat (limited to 'tests')
-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',