mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Install gotestsum if needed for junit results
This commit is contained in:
parent
b418bc83db
commit
031e1c562c
@ -225,9 +225,10 @@ produceJUnitXMLReport() {
|
||||
junit_xml_filename="${junit_filename_prefix}.xml"
|
||||
|
||||
if ! command -v gotestsum >/dev/null 2>&1; then
|
||||
kube::log::error "gotestsum not found; please cd to hack/tools and install with " \
|
||||
"GO111MODULE=on go install gotest.tools/gotestsum"
|
||||
return
|
||||
kube::log::status "gotestsum not found; installing from hack/tools"
|
||||
pushd "${KUBE_ROOT}/hack/tools" >/dev/null
|
||||
GO111MODULE=on go install gotest.tools/gotestsum
|
||||
popd >/dev/null
|
||||
fi
|
||||
gotestsum --junitfile "${junit_xml_filename}" --raw-command cat "${junit_filename_prefix}"*.stdout
|
||||
if [[ ! ${KUBE_KEEP_VERBOSE_TEST_OUTPUT} =~ ^[yY]$ ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user