diff options
author | Stella Stamenova <stilis@microsoft.com> | 2018-10-12 17:56:01 +0000 |
---|---|---|
committer | Stella Stamenova <stilis@microsoft.com> | 2018-10-12 17:56:01 +0000 |
commit | 073d21fad01fe2d6f3fc8257a16b9d732339bbcc (patch) | |
tree | c771a82b708022bb50e2e113e016b6f995c4a927 /lldb/packages/Python/lldbsuite/test | |
parent | 0916efc232599da451a385fc8940a521f6d0c89f (diff) | |
download | bcm5719-llvm-073d21fad01fe2d6f3fc8257a16b9d732339bbcc.tar.gz bcm5719-llvm-073d21fad01fe2d6f3fc8257a16b9d732339bbcc.zip |
[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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 563b19f5f02..982af9a9859 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -2240,7 +2240,7 @@ class TestBase(Base): filecheck_args = [filecheck_bin, check_file_abs] if 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_status = subproc.returncode |