diff --git a/tests/functional/characterisation/framework.sh b/tests/functional/characterisation/framework.sh index d2c2155db..6490d4ff5 100644 --- a/tests/functional/characterisation/framework.sh +++ b/tests/functional/characterisation/framework.sh @@ -71,7 +71,7 @@ function characterisationTestExit() { echo >&2 '' echo >&2 'You can rerun this test with:' 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 'to regenerate the files containing the expected output,' echo >&2 'and then view the git diff to decide whether a change is' diff --git a/tests/functional/common/test-root.sh b/tests/functional/common/test-root.sh index b50a06267..db17132f4 100644 --- a/tests/functional/common/test-root.sh +++ b/tests/functional/common/test-root.sh @@ -1,4 +1,5 @@ # 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 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 6f649c836..d917d91c3 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -263,7 +263,8 @@ foreach suite : suites 'ASAN_OPTIONS' : asan_options, '_NIX_TEST_SOURCE_DIR' : meson.current_source_dir(), '_NIX_TEST_BUILD_DIR' : meson.current_build_dir(), - 'TEST_NAME' : suite_name / name, + 'TEST_SUITE_NAME' : suite_name, + 'TEST_NAME' : name, 'NIX_REMOTE' : '', 'PS4' : '+(${BASH_SOURCE[0]-$0}:$LINENO) ', },