aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libutil/error.cc2
-rwxr-xr-xtests/functional/lang.sh2
-rw-r--r--tests/unit/meson.build6
3 files changed, 7 insertions, 3 deletions
diff --git a/src/libutil/error.cc b/src/libutil/error.cc
index 027f0b1a5..f57e3ef7d 100644
--- a/src/libutil/error.cc
+++ b/src/libutil/error.cc
@@ -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:
*
- * 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
*
*/
diff --git a/tests/functional/lang.sh b/tests/functional/lang.sh
index 59db10340..ca54fb88d 100755
--- a/tests/functional/lang.sh
+++ b/tests/functional/lang.sh
@@ -155,7 +155,7 @@ else
echo ''
echo 'You can rerun this test with:'
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 'to regenerate the files containing the expected output,'
echo 'and then view the git diff to decide whether a change is'
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 8b0c66dd8..04fdf62a7 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
@@ -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(