[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.
pull/6/head
Solly Ross 2017-10-13 11:38:05 -04:00
parent d2b41120ea
commit 55e1f6a541
1 changed files with 1 additions and 1 deletions

View File

@ -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