2016-08-20 01:20:19 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# exit if any subcommand return non-zero status
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Choose python version
|
|
|
|
if test "x$1" = x-3; then
|
2018-10-18 15:39:18 +01:00
|
|
|
PYTHON=py3
|
2016-08-20 01:20:19 +01:00
|
|
|
shift
|
|
|
|
elif test "x$1" = x-2; then
|
2018-10-18 15:39:18 +01:00
|
|
|
PYTHON=py2
|
2016-08-20 01:20:19 +01:00
|
|
|
shift
|
|
|
|
fi
|
2018-10-18 15:39:18 +01:00
|
|
|
test "x$PYTHON" = x && PYTHON=py
|
2016-08-20 01:20:19 +01:00
|
|
|
|
|
|
|
# Find tests
|
|
|
|
FILTERS=
|
|
|
|
for arg in "$@"; do
|
|
|
|
test "x$FILTERS" != x && FILTERS="$FILTERS or "
|
|
|
|
FILTERS="$FILTERS$arg"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Run tests
|
|
|
|
if [ -z "$FILTERS" ]; then
|
2018-07-25 18:48:32 +01:00
|
|
|
tox --develop -e $PYTHON
|
2016-08-20 01:20:19 +01:00
|
|
|
else
|
2018-07-25 18:48:32 +01:00
|
|
|
tox --develop -e $PYTHON -- -k "$FILTERS"
|
2016-08-20 01:20:19 +01:00
|
|
|
fi
|