[Lldb-commits] [lldb] r352710 - [testsuite] Fix TestAppleSimulator so that it works with Python 3.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 30 17:17:47 PST 2019


Author: davide
Date: Wed Jan 30 17:17:47 2019
New Revision: 352710

URL: http://llvm.org/viewvc/llvm-project?rev=352710&view=rev
Log:
[testsuite] Fix TestAppleSimulator so that it works with Python 3.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/decorators.py
    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=352710&r1=352709&r2=352710&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Wed Jan 30 17:17:47 2019
@@ -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:

Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py?rev=352710&r1=352709&r2=352710&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py Wed Jan 30 17:17:47 2019
@@ -40,7 +40,7 @@ class TestAppleSimulatorOSType(gdbremote
         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
         # 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)




More information about the lldb-commits mailing list