davide created this revision. davide added reviewers: JDevlieghere, friss, zturner, aprantl. Herald added a reviewer: serge-sans-paille.
In python 2, strings and bytes are the same, but they're not in python 3, hence the return of read() needs an explicit conversion. While I'm around, rename the return of Popen() from `pipe` to `process`, as that's what Popen returns. https://reviews.llvm.org/D56517 Files: lldb/packages/Python/lldbsuite/test/dotest.py Index: lldb/packages/Python/lldbsuite/test/dotest.py =================================================================== --- lldb/packages/Python/lldbsuite/test/dotest.py +++ lldb/packages/Python/lldbsuite/test/dotest.py @@ -1061,14 +1061,15 @@ def checkDsymForUUIDIsNotOn(): cmd = ["defaults", "read", "com.apple.DebugSymbols"] - pipe = subprocess.Popen( + process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - cmd_output = pipe.stdout.read() - if cmd_output and "DBGFileMappedPaths = " in cmd_output: + cmd_output = process.stdout.read() + output_str = cmd_output.decode("utf-8") + if "DBGFileMappedPaths = " in output_str: print("%s =>" % ' '.join(cmd)) - print(cmd_output) + print(output_str) print( "Disable automatic lookup and caching of dSYMs before running the test suite!") print("Exiting...")
Index: lldb/packages/Python/lldbsuite/test/dotest.py =================================================================== --- lldb/packages/Python/lldbsuite/test/dotest.py +++ lldb/packages/Python/lldbsuite/test/dotest.py @@ -1061,14 +1061,15 @@ def checkDsymForUUIDIsNotOn(): cmd = ["defaults", "read", "com.apple.DebugSymbols"] - pipe = subprocess.Popen( + process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - cmd_output = pipe.stdout.read() - if cmd_output and "DBGFileMappedPaths = " in cmd_output: + cmd_output = process.stdout.read() + output_str = cmd_output.decode("utf-8") + if "DBGFileMappedPaths = " in output_str: print("%s =>" % ' '.join(cmd)) - print(cmd_output) + print(output_str) print( "Disable automatic lookup and caching of dSYMs before running the test suite!") print("Exiting...")
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits