Author: stella.stamenova Date: Fri Oct 12 10:56:01 2018 New Revision: 344386
URL: http://llvm.org/viewvc/llvm-project?rev=344386&view=rev Log: [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 Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=344386&r1=344385&r2=344386&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Oct 12 10:56:01 2018 @@ -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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits