fonttools/run-tests.sh
Cosimo Lupo 88b6688fbd
tox: remove unnecessary 'nocov' factor
tox now allows to use exclamation mark to negate an environment factor.
2018-10-18 15:40:32 +01:00

29 lines
457 B
Bash
Executable File

#!/bin/sh
# exit if any subcommand return non-zero status
set -e
# Choose python version
if test "x$1" = x-3; then
PYTHON=py3
shift
elif test "x$1" = x-2; then
PYTHON=py2
shift
fi
test "x$PYTHON" = x && PYTHON=py
# Find tests
FILTERS=
for arg in "$@"; do
test "x$FILTERS" != x && FILTERS="$FILTERS or "
FILTERS="$FILTERS$arg"
done
# Run tests
if [ -z "$FILTERS" ]; then
tox --develop -e $PYTHON
else
tox --develop -e $PYTHON -- -k "$FILTERS"
fi