From 5969bbee79879d44e6ca2b6b5036e5706262bd21 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 10 Aug 2019 22:41:18 +0200 Subject: [PATCH] docker-py: output junit.xml for test-results Signed-off-by: Sebastiaan van Stijn --- Jenkinsfile | 5 +++++ hack/make/test-docker-py | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7269135415..12c6c7a020 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -80,6 +80,11 @@ pipeline { test-docker-py ''' } + post { + always { + junit testResults: 'bundles/test-docker-py/junit-report.xml', allowEmptyResults: true + } + } } stage("Static") { steps { diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index f35456be45..9625f47e61 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -17,6 +17,7 @@ source hack/make/.integration-test-helpers --deselect=tests/integration/api_exec_test.py::ExecDemuxTest::test_exec_command_tty_stream_no_demux \ --deselect=tests/integration/api_build_test.py::BuildTest::test_build_invalid_platform \ --deselect=tests/integration/api_image_test.py::PullImageTest::test_pull_invalid_platform \ +--junitxml=${DEST}/junit-report.xml \ }" ( bundle .integration-daemon-start @@ -56,8 +57,8 @@ source hack/make/.integration-test-helpers echo INFO: Starting docker-py tests... ( [ -n "${TESTDEBUG}" ] && set -x - # shellcheck disable=SC2086 - exec docker run --rm ${run_opts} "${docker_py_image}" pytest ${PY_TEST_OPTIONS} tests/integration + # shellcheck disable=SC2086,SC2140 + exec docker run --rm ${run_opts} --mount type=bind,"src=${ABS_DEST}","dst=/src/${DEST}" "${docker_py_image}" pytest ${PY_TEST_OPTIONS} tests/integration ) bundle .integration-daemon-stop ) 2>&1 | tee -a "$DEST/test.log"