Skip to content

ci: pytest generate junit reports #5235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ if (BUILD_TESTING)
COMMAND
pytest
-x -n=${N} --reruns=2 --durations=10 --cache-clear -rpfsq
--junitxml=../../build/junit/${test_target}.xml
-o log_cli=true --log-cli-level=DEBUG --provider-version=$ENV{S2N_LIBCRYPTO}
${test_file_path}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests/integrationv2
Expand Down
6 changes: 5 additions & 1 deletion tests/integrationv2/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ envlist = py39
skipsdist = True

[testenv]
allowlist_externals=bash
sed
# install pytest in the virtualenv where commands will be executed
setenv = S2N_INTEG_TEST = 1
passenv = DYLD_LIBRARY_PATH, LD_LIBRARY_PATH, OQS_OPENSSL_1_1_1_INSTALL_DIR, OPENSSL_1_0_2_INSTALL_DIR, HOME, TOX_TEST_NAME
Expand All @@ -17,12 +19,14 @@ deps =
# -rpfsq : print a (r)eport with (p)assed tests, (f)ailed tests, and (s)kipped tests
# --durations=10 : print the 10 slowest tests
commands =
bash -c 'set -e;export TEST_NAME=$(basename $TOX_TEST_NAME | sed ''s/test_//''| sed ''s/.py//''); \
pytest -x \
-n=2 \
--reruns=2 \
--junitxml=../../build/junit/$TEST_NAME.xml \
--cache-clear \
-rpfsq \
--durations=10 \
-o log_cli=true --log-cli-level=INFO \
--provider-version={env:S2N_LIBCRYPTO} \
{env:TOX_TEST_NAME:""}
{env:TOX_TEST_NAME:""} '
Loading