mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
[make-rules] test grep should treat binary as text
The output of `go test` is passed throug a grep filter that's used when producing junit output. Unfortunately, when testing round-trip conversions with random strings, grep can become convinced that the test output is binary, and will truncate a failed test before any output is displayed, showing "binary file (standard input) matches". This forces grep to consider test output to be text, so that we always see test results.
This commit is contained in:
parent
d2b41120ea
commit
55e1f6a541
@ -289,7 +289,7 @@ runTests() {
|
||||
${KUBE_RACE} ${KUBE_TIMEOUT} "${@}" \
|
||||
"${testargs[@]:+${testargs[@]}}" \
|
||||
| tee ${junit_filename_prefix:+"${junit_filename_prefix}.stdout"} \
|
||||
| grep "${go_test_grep_pattern}" && rc=$? || rc=$?
|
||||
| grep --binary-files=text "${go_test_grep_pattern}" && rc=$? || rc=$?
|
||||
produceJUnitXMLReport "${junit_filename_prefix}"
|
||||
return ${rc}
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user