Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit c0e26c4

Browse files
committed
docker-py: output junit.xml for test-results
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 5969bbee79879d44e6ca2b6b5036e5706262bd21) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 70303ded8e0a121bb59e5a52308181f18b0043ee Component: engine
1 parent 604478a commit c0e26c4

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

components/engine/Jenkinsfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ pipeline {
8080
test-docker-py
8181
'''
8282
}
83+
post {
84+
always {
85+
junit testResults: 'bundles/test-docker-py/junit-report.xml', allowEmptyResults: true
86+
}
87+
}
8388
}
8489
stage("Static") {
8590
steps {

components/engine/hack/make/test-docker-py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ source hack/make/.integration-test-helpers
1717
--deselect=tests/integration/api_exec_test.py::ExecDemuxTest::test_exec_command_tty_stream_no_demux \
1818
--deselect=tests/integration/api_build_test.py::BuildTest::test_build_invalid_platform \
1919
--deselect=tests/integration/api_image_test.py::PullImageTest::test_pull_invalid_platform \
20+
--junitxml=${DEST}/junit-report.xml \
2021
}"
2122
(
2223
bundle .integration-daemon-start
@@ -56,8 +57,8 @@ source hack/make/.integration-test-helpers
5657
echo INFO: Starting docker-py tests...
5758
(
5859
[ -n "${TESTDEBUG}" ] && set -x
59-
# shellcheck disable=SC2086
60-
exec docker run --rm ${run_opts} "${docker_py_image}" pytest ${PY_TEST_OPTIONS} tests/integration
60+
# shellcheck disable=SC2086,SC2140
61+
exec docker run --rm ${run_opts} --mount type=bind,"src=${ABS_DEST}","dst=/src/${DEST}" "${docker_py_image}" pytest ${PY_TEST_OPTIONS} tests/integration
6162
)
6263
bundle .integration-daemon-stop
6364
) 2>&1 | tee -a "$DEST/test.log"

0 commit comments

Comments
 (0)