Commit 73672dcd authored by Laurent Peuch's avatar Laurent Peuch

chore(pytest): integrate pytest-profiling

parent cb40bf5fd30c
Pipeline #66987 passed with stages
in 47 minutes and 49 seconds
......@@ -122,7 +122,7 @@ py3-server:
image: r.intra.logilab.fr/jenkins/jnlp:buster
before_script:
- sudo apt update
- sudo DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt-get install -y --assume-yes -qq -o=Dpkg::Use-Pty=0 slapd ldap-utils
- sudo DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt-get install -y --assume-yes -qq -o=Dpkg::Use-Pty=0 slapd ldap-utils graphviz
script:
- tox -e py3-server
artifacts:
......@@ -131,6 +131,7 @@ py3-server:
- /builds/cubicweb/cubicweb/server.html
- /builds/cubicweb/cubicweb/py3-server-deprecated-warnings.json
- /builds/cubicweb/cubicweb/reports/coverage-server.xml
- /builds/cubicweb/cubicweb/prof/combined.svg
reports:
junit: /builds/cubicweb/cubicweb/server.xml
cobertura: /builds/cubicweb/cubicweb/reports/coverage-server.xml
......@@ -152,7 +153,7 @@ py3-web:
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
before_script:
- sudo apt update && sudo apt install -y firefox-esr
- sudo apt update && sudo apt install -y firefox-esr graphviz
script:
- tox -e py3-web
artifacts:
......@@ -161,6 +162,7 @@ py3-web:
- /builds/cubicweb/cubicweb/web.html
- /builds/cubicweb/cubicweb/py3-web-deprecated-warnings.json
- /builds/cubicweb/cubicweb/reports/coverage-web.xml
- /builds/cubicweb/cubicweb/prof/combined.svg
reports:
junit: /builds/cubicweb/cubicweb/web.xml
cobertura: /builds/cubicweb/cubicweb/reports/coverage-web.xml
......@@ -182,7 +184,7 @@ py3-misc:
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
before_script:
- sudo apt update && sudo apt install -y firefox-esr
- sudo apt update && sudo apt install -y firefox-esr graphviz
script:
- tox -e py3-misc
artifacts:
......@@ -191,6 +193,7 @@ py3-misc:
- /builds/cubicweb/cubicweb/misc.html
- /builds/cubicweb/cubicweb/py3-misc-deprecated-warnings.json
- /builds/cubicweb/cubicweb/reports/coverage-misc.xml
- /builds/cubicweb/cubicweb/prof/combined.svg
reports:
junit: /builds/cubicweb/cubicweb/misc.xml
cobertura: /builds/cubicweb/cubicweb/reports/coverage-misc.xml
......
......@@ -5,3 +5,4 @@ git+https://github.com/Psycojoker/pytest-capture-deprecatedwarnings
pytest-cov
pdbpp
pytest-pudb
pytest-profiling
......@@ -18,9 +18,9 @@ deps =
web: -r{toxinidir}/requirements/test-web.txt
commands =
misc: {envpython} -m pip install --upgrade --no-deps --quiet https://github.com/logilab/yapps/tarball/master#egg=yapps
misc: {envpython} -m pytest --durations=20 --cov-report xml:{toxinidir}/reports/coverage-misc.xml --cov=cubicweb -rs --html=misc.html --self-contained-html --junitxml=misc.xml {posargs} {toxinidir}/cubicweb/test {toxinidir}/cubicweb/dataimport/test {toxinidir}/cubicweb/devtools/test {toxinidir}/cubicweb/entities/test {toxinidir}/cubicweb/ext/test {toxinidir}/cubicweb/hooks/test {toxinidir}/cubicweb/sobjects/test {toxinidir}/cubicweb/wsgi/test {toxinidir}/cubicweb/pyramid/test
server: {envpython} -m pytest --durations=20 --cov-report xml:{toxinidir}/reports/coverage-server.xml --cov=cubicweb -rs --html=server.html --self-contained-html --junitxml=server.xml {posargs} {toxinidir}/cubicweb/server/test
web: {envpython} -m pytest --durations=20 --cov-report xml:{toxinidir}/reports/coverage-web.xml --cov=cubicweb -rs --html=web.html --self-contained-html --junitxml=web.xml {posargs} {toxinidir}/cubicweb/web/test
misc: {envpython} -m pytest --durations=20 --cov-report xml:{toxinidir}/reports/coverage-misc.xml --cov=cubicweb -rs --html=misc.html --self-contained-html --junitxml=misc.xml --profile --profile-svg {posargs} {toxinidir}/cubicweb/test {toxinidir}/cubicweb/dataimport/test {toxinidir}/cubicweb/devtools/test {toxinidir}/cubicweb/entities/test {toxinidir}/cubicweb/ext/test {toxinidir}/cubicweb/hooks/test {toxinidir}/cubicweb/sobjects/test {toxinidir}/cubicweb/wsgi/test {toxinidir}/cubicweb/pyramid/test
server: {envpython} -m pytest --durations=20 --cov-report xml:{toxinidir}/reports/coverage-server.xml --cov=cubicweb -rs --html=server.html --self-contained-html --junitxml=server.xml --profile --profile-svg {posargs} {toxinidir}/cubicweb/server/test
web: {envpython} -m pytest --durations=20 --cov-report xml:{toxinidir}/reports/coverage-web.xml --cov=cubicweb -rs --html=web.html --self-contained-html --junitxml=web.xml --profile --profile-svg {posargs} {toxinidir}/cubicweb/web/test
[testenv:py3-from-forge-misc]
basepython=python3
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment