Browse code

docker-py: output junit.xml for test-results

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/08/11 05:41:18
Showing 2 changed files
... ...
@@ -80,6 +80,11 @@ pipeline {
80 80
                                     test-docker-py
81 81
                                 '''
82 82
                             }
83
+                            post {
84
+                                always {
85
+                                    junit testResults: 'bundles/test-docker-py/junit-report.xml', allowEmptyResults: true
86
+                                }
87
+                            }
83 88
                         }
84 89
                         stage("Static") {
85 90
                             steps {
... ...
@@ -17,6 +17,7 @@ source hack/make/.integration-test-helpers
17 17
 --deselect=tests/integration/api_exec_test.py::ExecDemuxTest::test_exec_command_tty_stream_no_demux \
18 18
 --deselect=tests/integration/api_build_test.py::BuildTest::test_build_invalid_platform \
19 19
 --deselect=tests/integration/api_image_test.py::PullImageTest::test_pull_invalid_platform \
20
+--junitxml=${DEST}/junit-report.xml \
20 21
 }"
21 22
 (
22 23
 	bundle .integration-daemon-start
... ...
@@ -56,8 +57,8 @@ source hack/make/.integration-test-helpers
56 56
 	echo INFO: Starting docker-py tests...
57 57
 	(
58 58
 		[ -n "${TESTDEBUG}" ] && set -x
59
-		# shellcheck disable=SC2086
60
-		exec docker run --rm ${run_opts} "${docker_py_image}" pytest ${PY_TEST_OPTIONS} tests/integration
59
+		# shellcheck disable=SC2086,SC2140
60
+		exec docker run --rm ${run_opts} --mount type=bind,"src=${ABS_DEST}","dst=/src/${DEST}" "${docker_py_image}" pytest ${PY_TEST_OPTIONS} tests/integration
61 61
 	)
62 62
 	bundle .integration-daemon-stop
63 63
 ) 2>&1 | tee -a "$DEST/test.log"