Merge changes Ib27cb43d,I03687b8b into main

* changes:
  testsuite: override NIX_CONF_DIR and NIX_USER_CONF_FILES
  Remove some outdated `make test` invocation suggestions
This commit is contained in:
jade 2024-10-09 20:37:16 +00:00 committed by Gerrit Code Review
commit 7f7a38f278
3 changed files with 7 additions and 3 deletions

View file

@ -133,7 +133,7 @@ static std::string indent(std::string_view indentFirst, std::string_view indentR
/** /**
* A development aid for finding missing positions, to improve error messages. Example use: * A development aid for finding missing positions, to improve error messages. Example use:
* *
* NIX_DEVELOPER_SHOW_UNKNOWN_LOCATIONS=1 _NIX_TEST_ACCEPT=1 make tests/lang.sh.test * NIX_DEVELOPER_SHOW_UNKNOWN_LOCATIONS=1 _NIX_TEST_ACCEPT=1 just test --suite installcheck -v functional-lang
* git diff -U20 tests * git diff -U20 tests
* *
*/ */

View file

@ -155,7 +155,7 @@ else
echo '' echo ''
echo 'You can rerun this test with:' echo 'You can rerun this test with:'
echo '' echo ''
echo ' _NIX_TEST_ACCEPT=1 make tests/functional/lang.sh.test' echo ' _NIX_TEST_ACCEPT=1 just test --suite installcheck -v functional-lang'
echo '' echo ''
echo 'to regenerate the files containing the expected output,' echo 'to regenerate the files containing the expected output,'
echo 'and then view the git diff to decide whether a change is' echo 'and then view the git diff to decide whether a change is'

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. # It's only ~200 lines; better to just refactor the tests themselves which we'll want to do anyway.
default_test_env = { 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( libutil_test_support_sources = files(