tox.ini: run tests on more than one processor (#75513)

This commit is contained in:
Benjamin Dauvergne 2023-04-21 22:17:30 +02:00
parent 2292be365f
commit fca6602675
2 changed files with 17 additions and 2 deletions

2
Jenkinsfile vendored
View File

@ -8,7 +8,7 @@ pipeline {
stages {
stage('Unit Tests') {
steps {
sh 'tox -rv'
sh 'NUMPROCESSES=6 tox -rv'
}
post {
always {

17
tox.ini
View File

@ -19,6 +19,7 @@ commands =
[testenv]
usedevelop = true
setenv =
NUMPROCESSES={env:NUMPROCESSES:1}
DJANGO_SETTINGS_MODULE=bijoe.settings
BIJOE_SETTINGS_FILE=tests/settings.py
SETUPTOOLS_USE_DISTUTILS=stdlib
@ -30,6 +31,7 @@ deps =
pytest-cov
pytest-django
pytest-freezegun
pytest-xdist
WebTest
django32: django-webtest
mock
@ -43,8 +45,21 @@ deps =
django32: djangorestframework>=3.7
django32: https://git.entrouvert.org/entrouvert/hobo/archive/main.tar.gz
commands =
py3-django32: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=bijoe tests/}
py3-django32: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=bijoe --cov-config=tox.ini --numprocesses {env:NUMPROCESSES:1} tests/}
[pytest]
filterwarnings =
once:.*
[coverage:run]
source =
authentic2
authentic2_auth_fc
authentic2_auth_oidc
authentic2_auth_saml
authentic2_idp_cas
authentic2_idp_oidc
django_rbac
[coverage:html]
show_contexts = True