1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-14 22:42:41 +01:00

Merge pull request #14516 from NixOS/honest-characterization-message

tests/functional: Output an actually correct command to accept test c…
This commit is contained in:
John Ericson 2025-11-09 17:10:49 +00:00 committed by GitHub
commit 18941cb8fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View file

@ -71,7 +71,7 @@ function characterisationTestExit() {
echo >&2 '' echo >&2 ''
echo >&2 'You can rerun this test with:' echo >&2 'You can rerun this test with:'
echo >&2 '' echo >&2 ''
echo >&2 " _NIX_TEST_ACCEPT=1 meson test ${TEST_NAME}" echo >&2 " _NIX_TEST_ACCEPT=1 meson test --suite ${TEST_SUITE_NAME} ${TEST_NAME}"
echo >&2 '' echo >&2 ''
echo >&2 'to regenerate the files containing the expected output,' echo >&2 'to regenerate the files containing the expected output,'
echo >&2 'and then view the git diff to decide whether a change is' echo >&2 'and then view the git diff to decide whether a change is'

View file

@ -1,4 +1,5 @@
# shellcheck shell=bash # shellcheck shell=bash
TEST_ROOT=$(realpath "${TMPDIR:-/tmp}/nix-test")/${TEST_NAME:-default/tests\/functional//} TEST_SUBDIR="${TEST_SUITE_NAME:-default}/${TEST_NAME:-tests/functional/}"
TEST_ROOT=$(realpath "${TMPDIR:-/tmp}/nix-test")/"$TEST_SUBDIR"
export TEST_ROOT export TEST_ROOT

View file

@ -263,7 +263,8 @@ foreach suite : suites
'ASAN_OPTIONS' : asan_options, 'ASAN_OPTIONS' : asan_options,
'_NIX_TEST_SOURCE_DIR' : meson.current_source_dir(), '_NIX_TEST_SOURCE_DIR' : meson.current_source_dir(),
'_NIX_TEST_BUILD_DIR' : meson.current_build_dir(), '_NIX_TEST_BUILD_DIR' : meson.current_build_dir(),
'TEST_NAME' : suite_name / name, 'TEST_SUITE_NAME' : suite_name,
'TEST_NAME' : name,
'NIX_REMOTE' : '', 'NIX_REMOTE' : '',
'PS4' : '+(${BASH_SOURCE[0]-$0}:$LINENO) ', 'PS4' : '+(${BASH_SOURCE[0]-$0}:$LINENO) ',
}, },