Remove TMPDIR dependency from tests/

Tests are now executed in a test-specific temporary directory, so test
output on failure should be reproducible/reusable as-is without needing
to have TMPDIR defined (as it only exists by default under macOS).
This commit is contained in:
Mahmoud Al-Qudsi
2021-07-30 19:21:36 -05:00
committed by Johannes Altmanninger
parent 6fc8038b4e
commit e96b6e157c
5 changed files with 23 additions and 20 deletions

View File

@@ -6,9 +6,9 @@ set fish (builtin realpath $fish)
# Isolated tmux. tmux can't handle session sockets in paths that are too long, and macOS has a very
# long $TMPDIR, so use a relative path - except macOS doesn't have `realpath --relative-to`...
# We have a unique TMPDIR assigned by the test driver, so this will work so long as `tmux` is only
# invoked from the same PWD.
set tmpdir (command mktemp -d $TMPDIR/tmp.XXXXXXXX)
# We are cd'd into a unique temp dir created/assigned by the test driver, so this will work so long
# as `tmux` is only invoked from the same PWD.
set tmpdir (command mktemp -d ./tmp.XXXXXXXX)
cd $tmpdir
set -g tmux tmux -S ./.tmux-socket -f /dev/null