diff options
author | Davide Italiano <davide@freebsd.org> | 2019-01-31 01:17:47 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2019-01-31 01:17:47 +0000 |
commit | 46138cdb0d9cef9aef3573914c8ec35ea39d28f8 (patch) | |
tree | 0ba57302b2c61a9af5027d1f164f2413a70c55e7 /lldb/packages/Python/lldbsuite/test | |
parent | 699bc17953a6a78bda7f557341baecfd8a2bb3e3 (diff) | |
download | bcm5719-llvm-46138cdb0d9cef9aef3573914c8ec35ea39d28f8.tar.gz bcm5719-llvm-46138cdb0d9cef9aef3573914c8ec35ea39d28f8.zip |
[testsuite] Fix TestAppleSimulator so that it works with Python 3.
llvm-svn: 352710
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/decorators.py | 2 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index 3d81df24f4a..72600204df4 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -363,7 +363,7 @@ def apple_simulator_test(platform): return "simulator tests are run only on darwin hosts" try: DEVNULL = open(os.devnull, 'w') - output = subprocess.check_output(["xcodebuild", "-showsdks"], stderr=DEVNULL) + output = subprocess.check_output(["xcodebuild", "-showsdks"], stderr=DEVNULL).decode("utf-8") if re.search('%ssimulator' % platform, output): return None else: diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py index 62c948c36cf..d10a9abfb13 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py @@ -40,7 +40,7 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase): self.assertIsNotNone(deviceUDID) exe_name = 'test_simulator_platform_{}'.format(platform) sdkroot = subprocess.check_output(['xcrun', '--show-sdk-path', '--sdk', - sdk]) + sdk]).decode("utf-8") self.build(dictionary={ 'EXE': exe_name, 'SDKROOT': sdkroot.strip(), 'ARCH': arch }) exe_path = self.getBuildArtifact(exe_name) @@ -51,7 +51,7 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase): # Get the PID from the process output pid = None while not pid: - stderr = sim_launcher.stderr.readline() + stderr = sim_launcher.stderr.readline().decode("utf-8") if stderr == '': continue m = re.match(r"PID: (.*)", stderr) |