Skip to content

Commit 31be2d0

Browse files
committed
pytest: Generate junit.xml test report
Generate a junit.xml test report from pytest. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 62ba9fa commit 31be2d0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ shippable/
1212
htmlcov/
1313
.dir-locals.el
1414
.venv/
15+
junit.xml

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ setenv =
3838
# For instance: ./.tox/py3/tmp/
3939
TOXTEMPDIR={envtmpdir}
4040
commands =
41-
python -m pytest --cov-report=html --cov-config=pyproject.toml --cov=west {posargs:tests} --basetemp='{envtmpdir}/pytest with space/'
41+
python -m pytest --junitxml=junit.xml -o junit_family=xunit1 --cov-report=html --cov-config=pyproject.toml --cov=west {posargs:tests} --basetemp='{envtmpdir}/pytest with space/'
4242
python -m flake8 --config='{toxinidir}'/tox.ini '{toxinidir}'
4343
python -m ruff check '{toxinidir}'
4444
python -m mypy --config-file='{toxinidir}'/tox.ini --package=west

0 commit comments

Comments
 (0)