diff options
Diffstat (limited to '')
-rwxr-xr-x | ci/pytests/lint.sh | 16 | ||||
-rwxr-xr-x | ci/pytests/pylint-run.sh | 9 | ||||
-rwxr-xr-x | ci/pytests/run-extended.sh | 5 | ||||
-rwxr-xr-x | ci/pytests/run.sh | 3 |
4 files changed, 33 insertions, 0 deletions
diff --git a/ci/pytests/lint.sh b/ci/pytests/lint.sh new file mode 100755 index 0000000..b6c0bfc --- /dev/null +++ b/ci/pytests/lint.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +python3 -m flake8 --max-line-length=100 tests/pytests +FLAKE8=$? + +ci/pytests/pylint-run.sh +PYLINT=$? + +if [ $PYLINT -ne 0 ]; then + exit 1 +fi +if [ $FLAKE8 -ne 0 ]; then + exit 1 +fi + +exit 0 diff --git a/ci/pytests/pylint-run.sh b/ci/pytests/pylint-run.sh new file mode 100755 index 0000000..159a830 --- /dev/null +++ b/ci/pytests/pylint-run.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +set -e + +# Find Python modules and standalone Python scripts +FILES=$(find ./tests/pytests \ + -type d -exec test -e '{}/__init__.py' \; -print -prune -o \ + -name '*.py' -print) + +python3 -m pylint -j 0 --rcfile ./tests/pytests/pylintrc ${FILES} diff --git a/ci/pytests/run-extended.sh b/ci/pytests/run-extended.sh new file mode 100755 index 0000000..694fba5 --- /dev/null +++ b/ci/pytests/run-extended.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Execute extended, long-running test suite + +python3 -m pytest -ra --capture=no tests/pytests/conn_flood.py diff --git a/ci/pytests/run.sh b/ci/pytests/run.sh new file mode 100755 index 0000000..e1b55af --- /dev/null +++ b/ci/pytests/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +python3 -m pytest --html pytests.html --self-contained-html -dn 24 tests/pytests |