[lldbsuite] Fix the filecheck functionality to work with Python 3
Summary: This is another string/byte conversion issue between Python 2 and 3. In Python 2, the subprocess communication expects a byte string, but in Python 3, it expects bytes. Since both versions are capable of using strings when universal_newlines is set to True AND filecheck operates on strings, force the use of strings. Reviewers: zturner, asmith, vsk Reviewed By: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D53166 llvm-svn: 344386
This commit is contained in:
parent
0916efc232
commit
073d21fad0
|
@ -2240,7 +2240,7 @@ class TestBase(Base):
|
||||||
filecheck_args = [filecheck_bin, check_file_abs]
|
filecheck_args = [filecheck_bin, check_file_abs]
|
||||||
if filecheck_options:
|
if filecheck_options:
|
||||||
filecheck_args.append(filecheck_options)
|
filecheck_args.append(filecheck_options)
|
||||||
subproc = Popen(filecheck_args, stdin=PIPE, stdout=PIPE, stderr=PIPE)
|
subproc = Popen(filecheck_args, stdin=PIPE, stdout=PIPE, stderr=PIPE, universal_newlines = True)
|
||||||
cmd_stdout, cmd_stderr = subproc.communicate(input=output)
|
cmd_stdout, cmd_stderr = subproc.communicate(input=output)
|
||||||
cmd_status = subproc.returncode
|
cmd_status = subproc.returncode
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue