mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Merge pull request #98668 from liggitt/gotestsum
Install gotestsum if needed for junit results
This commit is contained in:
commit
e161051c83
@ -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