summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/dotest.py
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2019-01-10 01:15:18 +0000
committerDavide Italiano <davide@freebsd.org>2019-01-10 01:15:18 +0000
commit53dddee1711efebd2cba328f6bd5ddfbdf9dc0dc (patch)
tree6ba0eae85c610a9b67bd84fb38a522b6f8381570 /lldb/packages/Python/lldbsuite/test/dotest.py
parent8d530b777d5332ebc1fbf8239865dc1f507e740c (diff)
downloadbcm5719-llvm-53dddee1711efebd2cba328f6bd5ddfbdf9dc0dc.tar.gz
bcm5719-llvm-53dddee1711efebd2cba328f6bd5ddfbdf9dc0dc.zip
[Python] Update checkDsymForUUIDIsOn to be compatible with Python 3.
Summary: 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. Reviewers: JDevlieghere, friss, zturner, aprantl, serge-sans-paille Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56517 llvm-svn: 350788
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index f614fb61a35..644f63576c0 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -1061,14 +1061,15 @@ def getMyCommandLine():
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...")
OpenPOWER on IntegriCloud