testsuite: override NIX_CONF_DIR and NIX_USER_CONF_FILES

The test suite can load the global configuration files under certain
circumstances, and, though we would really rather it didn't ever do that
at all, we should at least break the mechanism.

Fixes: lix-project/lix#474
Change-Id: Ib27cb43dd5dfaa70ac491c395b5ba308fd7bd289
This commit is contained in:
jade 2024-10-04 19:13:20 -07:00
parent 19edaed81b
commit 345e3d068a

View file

@ -12,7 +12,11 @@
# It's only ~200 lines; better to just refactor the tests themselves which we'll want to do anyway.
default_test_env = {
'ASAN_OPTIONS': 'detect_leaks=0:halt_on_error=1:abort_on_error=1:print_summary=1:dump_instruction_bytes=1'
'ASAN_OPTIONS': 'detect_leaks=0:halt_on_error=1:abort_on_error=1:print_summary=1:dump_instruction_bytes=1',
# Prevents loading global configuration file in /etc/nix/nix.conf in tests 😱
'NIX_CONF_DIR': '/var/empty',
# Prevent loading user configuration files in tests
'NIX_USER_CONF_FILES': '',
}
libutil_test_support_sources = files(