Skip to content

Commit

Permalink
feat: generate and handle junit XMLs
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoisel committed Oct 30, 2024
1 parent 10ca4fb commit 9eb3153
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ test-job:
- env | sort
- ENV_ID=${CI_PIPELINE_ID} docker compose up -d
script:
- ENV_ID=${CI_PIPELINE_ID} docker compose exec -ti debian pytest -svv --lg-env config/qemu.yaml -m 'not openvpn'
- ENV_ID=${CI_PIPELINE_ID} docker compose exec -ti debian pytest -svv --lg-env config/qemu.yaml --junit-xml=/tmp/result.xml -m 'not openvpn'
- ENV_ID=${CI_PIPELINE_ID} docker compose cp debian:/tmp/result.xml result.xml
after_script:
- ENV_ID=${CI_PIPELINE_ID} docker compose rm -sf
- docker network prune -f
artifacts:
when: always
paths:
- result.xml
reports:
junit: result.xml

4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ pythonpath = util
log_cli = true
log_cli_level = INFO

junit_suite_name = "Labgrid QEMU Sample"
junit_log_passing_tests = True
junit_logging = all

markers =
openvpn: Tests OpenVPN related functionality

0 comments on commit 9eb3153

Please sign in to comment.