From 98ea7b944143aa854b0101def2273e0f8ef12b52 Mon Sep 17 00:00:00 2001 From: Ivan Shvedunov Date: Thu, 18 Aug 2016 19:04:01 +0300 Subject: [PATCH] Fix overlong junit filename prefixes --- hack/make-rules/test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hack/make-rules/test.sh b/hack/make-rules/test.sh index 6ad4af19961ae..1881fbcb16b05 100755 --- a/hack/make-rules/test.sh +++ b/hack/make-rules/test.sh @@ -156,8 +156,10 @@ junitFilenamePrefix() { fi mkdir -p "${KUBE_JUNIT_REPORT_DIR}" local KUBE_TEST_API_NO_SLASH="${KUBE_TEST_API//\//-}" - # This file name isn't parsed by anything, and tee needs a shorter file name. + # This filename isn't parsed by anything, + # and we must avoid exceeding 255 character filename limit. KUBE_TEST_API_NO_SLASH="${KUBE_TEST_API_NO_SLASH//k8s.io-/}" + KUBE_TEST_API_NO_SLASH="$(echo "$KUBE_TEST_API_NO_SLASH"|sed 's/\([0-9]\)alpha\([0-9]\)/\1a\2/g;s/\([0-9]\)beta\([0-9]\)/\1b\2/g')" echo "${KUBE_JUNIT_REPORT_DIR}/junit_${KUBE_TEST_API_NO_SLASH}_$(kube::util::sortable_date)" }