From 48295619b5f641c4ea8a877f401d22ab05c6f90b Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 8 Jun 2016 14:41:44 +0000 Subject: [PATCH] [lit] Ensure we get bytes when reading redirected output files. llvm-svn: 272147 --- llvm/utils/lit/lit/TestRunner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py index 761fcb981a12..36d429204fd0 100644 --- a/llvm/utils/lit/lit/TestRunner.py +++ b/llvm/utils/lit/lit/TestRunner.py @@ -401,7 +401,7 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper): for (name, mode, f, path) in sorted(opened_files): if path is not None and mode in ('w', 'a'): try: - with open(path) as f: + with open(path, 'rb') as f: data = f.read() except: data = None