Merge "tests/libcmd: set HOME to a temporary directory" into main

This commit is contained in:
alois31 2024-06-13 05:27:55 +00:00 committed by Gerrit Code Review
commit 1d6fd94cf9

View file

@ -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',