mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +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"
|
junit_xml_filename="${junit_filename_prefix}.xml"
|
||||||
|
|
||||||
if ! command -v gotestsum >/dev/null 2>&1; then
|
if ! command -v gotestsum >/dev/null 2>&1; then
|
||||||
kube::log::error "gotestsum not found; please cd to hack/tools and install with " \
|
kube::log::status "gotestsum not found; installing from hack/tools"
|
||||||
"GO111MODULE=on go install gotest.tools/gotestsum"
|
pushd "${KUBE_ROOT}/hack/tools" >/dev/null
|
||||||
return
|
GO111MODULE=on go install gotest.tools/gotestsum
|
||||||
|
popd >/dev/null
|
||||||
fi
|
fi
|
||||||
gotestsum --junitfile "${junit_xml_filename}" --raw-command cat "${junit_filename_prefix}"*.stdout
|
gotestsum --junitfile "${junit_xml_filename}" --raw-command cat "${junit_filename_prefix}"*.stdout
|
||||||
if [[ ! ${KUBE_KEEP_VERBOSE_TEST_OUTPUT} =~ ^[yY]$ ]]; then
|
if [[ ! ${KUBE_KEEP_VERBOSE_TEST_OUTPUT} =~ ^[yY]$ ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user