mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
[lit] Ensure test output is converted to strings where possible.
- This cleans up the text output of failing tests when run under PY3. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188416 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -156,4 +156,14 @@ def executeCommand(command, cwd=None, env=None):
|
||||
if exitCode == -signal.SIGINT:
|
||||
raise KeyboardInterrupt
|
||||
|
||||
# Ensure the resulting output is always of string type.
|
||||
try:
|
||||
out = str(out.decode('ascii'))
|
||||
except:
|
||||
out = str(out)
|
||||
try:
|
||||
err = str(err.decode('ascii'))
|
||||
except:
|
||||
err = str(err)
|
||||
|
||||
return out, err, exitCode
|
||||
|
||||
Reference in New Issue
Block a user