powerline/tests/test.sh

30 lines
725 B
Bash
Executable File

#!/bin/sh
: ${PYTHON:=python}
FAILED=0
export PYTHONPATH="${PYTHONPATH}:`realpath .`"
for file in tests/test_*.py ; do
if ! ${PYTHON} $file --verbose --catch ; then
echo "Failed test(s) from $file"
FAILED=1
fi
done
if ! ${PYTHON} scripts/powerline-lint -p powerline/config_files ; then
echo "Failed powerline-lint"
FAILED=1
fi
for script in tests/*.vim ; do
if ! vim -u NONE -S $script || test -f message.fail ; then
echo "Failed script $script" >&2
cat message.fail >&2
rm message.fail
FAILED=1
fi
done
if ! bash tests/test_shells/test.sh ; then
echo "Failed shells"
if ${PYTHON} -c 'import platform, sys; sys.exit(1 * (platform.python_implementation() == "PyPy"))' ; then
FAILED=1
fi
fi
exit $FAILED