Skip to content

Commit 38edd23

Browse files
committed
[lldb] Fix TestAppleSimulatorOSType for older watchOS SDKs
Older watchOS SDKs *only* support i386 so we can't use x86_64/arm64 unconditionally.
1 parent 5079bc8 commit 38edd23

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,17 @@ def check_simulator_ostype(self, sdk, platform_name, arch=platform.machine()):
4747

4848
# Launch the process using simctl
4949
self.assertIsNotNone(deviceUDID)
50+
5051
exe_name = 'test_simulator_platform_{}'.format(platform_name)
5152
sdkroot = lldbutil.get_xcode_sdk_root(sdk)
5253
vers = lldbutil.get_xcode_sdk_version(sdk)
54+
55+
# Older versions of watchOS (<7.0) only support i386
56+
if platform_name == 'watchos':
57+
from distutils.version import LooseVersion
58+
if LooseVersion(vers) < LooseVersion("7.0"):
59+
arch = 'i386'
60+
5361
triple = '-'.join([arch, 'apple', platform_name + vers, 'simulator'])
5462
version_min = '-m{}-simulator-version-min={}'.format(platform_name, vers)
5563
self.build(

0 commit comments

Comments
 (0)