mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 00:31:13 -03:00
Fix test driver on BSDs
FreeBSD at least has `realpath` without `--no-symlinks`, so the tests cannot start. Fix this by using the `pwd -P` trick.
This commit is contained in:
@@ -29,14 +29,8 @@ die() {
|
||||
|
||||
# To keep things sane and to make error messages comprehensible, do not use relative paths anywhere
|
||||
# in this script. Instead, make all paths relative to one of these or the new $HOME ($homedir)."
|
||||
TESTS_ROOT="$(dirname "$0")"
|
||||
BUILD_ROOT="${TESTS_ROOT}/.."
|
||||
|
||||
# macOS (still!) doesn't have `readlink -f` or `realpath`. That's OK, this is just for aesthetics.
|
||||
if command -v realpath 1>/dev/null 2>/dev/null; then
|
||||
TESTS_ROOT="$(realpath --no-symlinks "${TESTS_ROOT}")"
|
||||
BUILD_ROOT="$(realpath --no-symlinks "${BUILD_ROOT}")"
|
||||
fi
|
||||
TESTS_ROOT="$(cd $(dirname "$0") && pwd -P)"
|
||||
BUILD_ROOT="$(cd $(dirname "$TESTS_ROOT") && pwd -P)"
|
||||
|
||||
if ! test -z "$__fish_is_running_tests"; then
|
||||
echo "Recursive test invocation detected!" 1>&2
|
||||
|
||||
Reference in New Issue
Block a user