Hide test/vterm_tmux in env variable, use absolute paths
This commit is contained in:
parent
1b3aacb837
commit
65130ae6ff
|
@ -35,7 +35,7 @@ fail() {
|
|||
local full_msg="$fail_char $POWERLINE_CURRENT_SUITE|$test_name :: $message"
|
||||
FAIL_SUMMARY="${FAIL_SUMMARY}${NL}${full_msg}"
|
||||
echo "Failed: $full_msg"
|
||||
echo "$full_msg" >> tests/failures
|
||||
echo "$full_msg" >> "$ROOT/tests/failures"
|
||||
if test "x$allow_failure" = "x" ; then
|
||||
FAILED=1
|
||||
fi
|
||||
|
|
|
@ -3,18 +3,20 @@
|
|||
|
||||
enter_suite tmux
|
||||
|
||||
rm -rf tests/vterm_tmux
|
||||
mkdir tests/vterm_tmux
|
||||
mkdir tests/vterm_tmux/path
|
||||
VTERM_TEST_DIR="$ROOT/tests/vterm_tmux"
|
||||
|
||||
ln -s "$(which "${PYTHON}")" tests/vterm_tmux/path/python
|
||||
ln -s "$(which bash)" tests/vterm_tmux/path
|
||||
ln -s "$(which env)" tests/vterm_tmux/path
|
||||
ln -s "$(which cut)" tests/vterm_tmux/path
|
||||
ln -s "$PWD/scripts/powerline-render" tests/vterm_tmux/path
|
||||
ln -s "$PWD/scripts/powerline-config" tests/vterm_tmux/path
|
||||
rm -rf "$VTERM_TEST_DIR"
|
||||
mkdir "$VTERM_TEST_DIR"
|
||||
mkdir "$VTERM_TEST_DIR/path"
|
||||
|
||||
cp -r tests/terminfo tests/vterm_tmux
|
||||
ln -s "$(which "${PYTHON}")" "$VTERM_TEST_DIR/path/python"
|
||||
ln -s "$(which bash)" "$VTERM_TEST_DIR/path"
|
||||
ln -s "$(which env)" "$VTERM_TEST_DIR/path"
|
||||
ln -s "$(which cut)" "$VTERM_TEST_DIR/path"
|
||||
ln -s "$ROOT/scripts/powerline-render" "$VTERM_TEST_DIR/path"
|
||||
ln -s "$ROOT/scripts/powerline-config" "$VTERM_TEST_DIR/path"
|
||||
|
||||
cp -r "$ROOT/tests/terminfo" "$VTERM_TEST_DIR"
|
||||
|
||||
test_tmux() {
|
||||
if test "$PYTHON_IMPLEMENTATION" = PyPy; then
|
||||
|
@ -25,17 +27,18 @@ test_tmux() {
|
|||
if ! which "${POWERLINE_TMUX_EXE}" ; then
|
||||
return 0
|
||||
fi
|
||||
ln -sf "$(which "${POWERLINE_TMUX_EXE}")" tests/vterm_tmux/path
|
||||
f=tests/test_in_vterm/test_tmux.py
|
||||
if ! "${PYTHON}" $f ; then
|
||||
ln -sf "$(which "${POWERLINE_TMUX_EXE}")" "$VTERM_TEST_DIR/path"
|
||||
f="$ROOT/tests/test_in_vterm/test_tmux.py"
|
||||
if ! "${PYTHON}" "$f" ; then
|
||||
local test_name="$("$POWERLINE_TMUX_EXE" -V 2>&1 | cut -d' ' -f2)"
|
||||
fail "$test_name" F "Failed vterm test $f"
|
||||
fi
|
||||
}
|
||||
|
||||
if test -z "$POWERLINE_TMUX_EXE" && test -d tests/bot-ci/deps/tmux ; then
|
||||
for tmux in tests/bot-ci/deps/tmux/tmux-*/tmux ; do
|
||||
export POWERLINE_TMUX_EXE="$PWD/$tmux"
|
||||
if test -z "$POWERLINE_TMUX_EXE" && test -d "$ROOT/tests/bot-ci/deps/tmux"
|
||||
then
|
||||
for tmux in "$ROOT"/tests/bot-ci/deps/tmux/tmux-*/tmux ; do
|
||||
export POWERLINE_TMUX_EXE="$tmux"
|
||||
test_tmux || true
|
||||
done
|
||||
else
|
||||
|
@ -44,7 +47,7 @@ else
|
|||
fi
|
||||
|
||||
if test $FAILED -eq 0 ; then
|
||||
rm -rf tests/vterm_tmux
|
||||
rm -rf "$VTERM_TEST_DIR"
|
||||
else
|
||||
echo "$FAIL_SUMMARY"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue