1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 04:56:01 +01:00
nix/tests/functional/common/test-root.sh
Sergei Zimmerman 98e61c6da9
tests/functional: Output an actually correct command to accept test changes
I've run into this quite a few times when working with characterization test
infra. It would print an invalid command:

_NIX_TEST_ACCEPT=1 meson test main/lang

Which you'd then proceed to run and it would fail. This commit makes it
be honest about the command you need to run:

_NIX_TEST_ACCEPT=1 meson test --suite main lang
2025-11-09 16:52:51 +03:00

5 lines
180 B
Bash

# shellcheck shell=bash
TEST_SUBDIR="${TEST_SUITE_NAME:-default}/${TEST_NAME:-tests/functional/}"
TEST_ROOT=$(realpath "${TMPDIR:-/tmp}/nix-test")/"$TEST_SUBDIR"
export TEST_ROOT