From 55e1f6a541f25a6006f2548d64a0cf99cf247036 Mon Sep 17 00:00:00 2001 From: Solly Ross Date: Fri, 13 Oct 2017 11:38:05 -0400 Subject: [PATCH] [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. --- hack/make-rules/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/make-rules/test.sh b/hack/make-rules/test.sh index 151060ed8b0..c7b5a1481a8 100755 --- a/hack/make-rules/test.sh +++ b/hack/make-rules/test.sh @@ -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