0008-add-a-jenkins-script-8425.patch
jenkins.sh | ||
---|---|---|
1 |
#!/bin/sh |
|
2 | ||
3 |
rm -f *coverage.xml |
|
4 |
rm -f *test_results.xml |
|
5 | ||
6 |
export PIP_USE_WHEEL=no |
|
7 |
pip install --upgrade pip |
|
8 |
pip install --upgrade pylint==1.4.0 astroid==1.3.2 # 1.4.1 is buggy |
|
9 |
pip install --upgrade pytest pytest-django pytest-cov |
|
10 |
pip install --upgrade django-tenant-schemas |
|
11 |
pip install --upgrade -r requirements.txt |
|
12 | ||
13 |
DJANGO_SETTINGS_MODULE=hobo.settings \ |
|
14 |
HOBO_SETTINGS_FILE=tests/settings.py \ |
|
15 |
py.test --junitxml=hobo_server_test_results.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc tests/ |
|
16 |
mv coverage.xml hobo_server_coverage.xml |
|
17 | ||
18 |
(cd tests_multitenant ; PYTHONPATH=. DJANGO_SETTINGS_MODULE=settings py.test --junitxml=../multitenant_test_results.xml --cov-report xml --cov=../hobo/ --cov-config .coveragerc .) |
|
19 |
mv tests_multitenant/coverage.xml multitenant_coverage.xml |
|
20 |
./merge-junit-results.py hobo_server_test_results.xml multitenant_test_results.xml >test_results.xml |
|
21 |
./merge-coverage.py -o coverage.xml *_coverage.xml |
|
22 | ||
23 |
test -f pylint.out && cp pylint.out pylint.out.prev |
|
24 |
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc hobo | tee pylint.out) || /bin/true |
|
25 |
test -f pylint.out.prev && (diff pylint.out.prev pylint.out | grep '^[><]' | grep .py) || /bin/true |
|
0 |
- |