Skip to content

Commit ded4f74

Browse files
authored
Merge pull request kubernetes#87082 from liggitt/cleanup-testapi
Remove unused KUBE_TEST_API logic
2 parents 652cc2e + 2a47900 commit ded4f74

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

hack/make-rules/test.sh

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ export KUBE_CACHE_MUTATION_DETECTOR
3131
KUBE_PANIC_WATCH_DECODE_ERROR="${KUBE_PANIC_WATCH_DECODE_ERROR:-true}"
3232
export KUBE_PANIC_WATCH_DECODE_ERROR
3333

34-
# Handle case where OS has sha#sum commands, instead of shasum.
35-
if which shasum >/dev/null 2>&1; then
36-
SHA1SUM="shasum -a1"
37-
elif which sha1sum >/dev/null 2>&1; then
38-
SHA1SUM="sha1sum"
39-
else
40-
echo "Failed to find shasum or sha1sum utility." >&2
41-
exit 1
42-
fi
43-
4434
kube::test::find_dirs() {
4535
(
4636
cd "${KUBE_ROOT}"
@@ -182,14 +172,7 @@ junitFilenamePrefix() {
182172
return
183173
fi
184174
mkdir -p "${KUBE_JUNIT_REPORT_DIR}"
185-
# This filename isn't parsed by anything, and we must avoid
186-
# exceeding 255 character filename limit. KUBE_TEST_API
187-
# barely fits there and in coverage mode test names are
188-
# appended to generated file names, easily exceeding
189-
# 255 chars in length. So let's just use a sha1 hash of it.
190-
local KUBE_TEST_API_HASH
191-
KUBE_TEST_API_HASH="$(echo -n "${KUBE_TEST_API//\//-}"| ${SHA1SUM} |awk '{print $1}')"
192-
echo "${KUBE_JUNIT_REPORT_DIR}/junit_${KUBE_TEST_API_HASH}_$(kube::util::sortable_date)"
175+
echo "${KUBE_JUNIT_REPORT_DIR}/junit_$(kube::util::sortable_date)"
193176
}
194177

195178
verifyAndSuggestPackagePath() {
@@ -274,9 +257,8 @@ runTests() {
274257
fi
275258

276259
# Create coverage report directories.
277-
KUBE_TEST_API_HASH="$(echo -n "${KUBE_TEST_API//\//-}"| ${SHA1SUM} |awk '{print $1}')"
278260
if [[ -z "${KUBE_COVER_REPORT_DIR}" ]]; then
279-
cover_report_dir="/tmp/k8s_coverage/${KUBE_TEST_API_HASH}/$(kube::util::sortable_date)"
261+
cover_report_dir="/tmp/k8s_coverage/$(kube::util::sortable_date)"
280262
else
281263
cover_report_dir="${KUBE_COVER_REPORT_DIR}"
282264
fi

0 commit comments

Comments
 (0)