-
Notifications
You must be signed in to change notification settings - Fork 10
/
check.sh
executable file
·33 lines (29 loc) · 983 Bytes
/
check.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
set -Ceu
: ${PYTHON:=python}
root=`cd -- "$(dirname -- "$0")" && pwd`
(
set -Ceu
cd -- "${root}"
make clean
make all
# "$PYTHON" setup.py build
if [ $# -eq 0 ]; then
# By default run all tests.
# Any test which uses this flag should end with __ci_() which
# activates integration testing code path. If --integration is
# not specified then a __ci_() test will either run as a crash test
# or not run at all. (Use git grep '__ci_' to find these tests.)
./pythenv.sh "$PYTHON" -m pytest --pyargs fldr
elif [ ${1} = 'crash' ]; then
./pythenv.sh "$PYTHON" -m pytest -k 'not __ci_' --pyargs fldr
elif [ ${1} = 'release' ]; then
# Make a release
rm -rf dist
"$PYTHON" setup.py sdist bdist_wheel
twine upload --repository pypi dist/*
else
# If args are specified delegate control to user.
./pythenv.sh "$PYTHON" -m pytest "$@"
fi
)