From 9bea349660c8230fe33f62a5c03e647854125afc Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 2 Mar 2016 10:59:16 -0500 Subject: [PATCH] Account for Windows line endings in runner. Otherwise the split on "--- DONE ---\n" gets confused. Change-Id: I74561a99e52b98e85f67efd85523213ad443d325 Reviewed-on: https://boringssl-review.googlesource.com/7283 Reviewed-by: Adam Langley --- ssl/test/runner/runner.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go index 68bfd563..86d0d446 100644 --- a/ssl/test/runner/runner.go +++ b/ssl/test/runner/runner.go @@ -736,8 +736,9 @@ func runTest(test *testCase, shimPath string, mallocNumToFail int64) error { } } - stdout := string(stdoutBuf.Bytes()) - stderr := string(stderrBuf.Bytes()) + // Account for Windows line endings. + stdout := strings.Replace(string(stdoutBuf.Bytes()), "\r\n", "\n", -1) + stderr := strings.Replace(string(stderrBuf.Bytes()), "\r\n", "\n", -1) // Separate the errors from the shim and those from tools like // AddressSanitizer.