35 lines
1.1 KiB
Bash
Executable File
35 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
for DIRECTORY in "htmlcov" "venv"
|
|
do
|
|
if [ -d "$DIRECTORY" ]; then
|
|
rm -r $DIRECTORY
|
|
fi
|
|
done
|
|
|
|
virtualenv --system-site-packages venv
|
|
PIP_BIN=venv/bin/pip
|
|
|
|
rm -f coverage.xml
|
|
rm -f test_results.xml
|
|
cat << _EOF_ > .coveragerc
|
|
[run]
|
|
omit = wcs/ctl/Bouncers/*.py wcs/qommon/vendor/*.py
|
|
|
|
[report]
|
|
omit = wcs/ctl/Bouncers/*.py wcs/qommon/vendor/*.py
|
|
_EOF_
|
|
|
|
# $PIP_BIN install --upgrade 'pip<8'
|
|
$PIP_BIN install --upgrade setuptools
|
|
$PIP_BIN install --upgrade 'pytest<4.1' WebTest mock pytest-cov pyquery pytest-django
|
|
$PIP_BIN install --upgrade 'pylint<1.8' # 1.8 broken (cf build #3023)
|
|
$PIP_BIN install --upgrade 'Django==1.8' 'gadjo' 'django-ckeditor<4.5.3'
|
|
|
|
LC_ALL=C LC_TIME=C LANG=C PYTHONPATH=$(pwd):$PYTHONPATH venv/bin/py.test --junitxml=test_results.xml --cov-report xml --cov-report html --cov=wcs/ --cov-config .coveragerc -v tests/
|
|
test -f pylint.out && cp pylint.out pylint.out.prev
|
|
(venv/bin/pylint -f parseable --rcfile /var/lib/jenkins/pylint.wcs.rc wcs | tee pylint.out) || /bin/true
|
|
test -f pylint.out.prev && (diff pylint.out.prev pylint.out | grep '^[><]' | grep .py) || /bin/true
|