Author: Jonas Devlieghere Date: 2021-02-03T16:32:55-08:00 New Revision: e3bb1c80fe68110f6362af0413c04cd77a05fbac
URL: https://github.com/llvm/llvm-project/commit/e3bb1c80fe68110f6362af0413c04cd77a05fbac DIFF: https://github.com/llvm/llvm-project/commit/e3bb1c80fe68110f6362af0413c04cd77a05fbac.diff LOG: [lldb] Rollback to using i386 for the watch simulator I switched the watch simulator test from i386 to using x86_64, but apparently that's not supported on the bots. Rollback to using i386 and solve the original issue by passing the target, similar to what I did in TestSimulatorPlatform.py. Added: Modified: lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py Removed: ################################################################################ diff --git a/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py b/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py index 609c6b520d31..d25ac26cf5fb 100644 --- a/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py +++ b/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py @@ -15,7 +15,7 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase): # Number of stderr lines to read from the simctl output. READ_LINES = 10 - def check_simulator_ostype(self, sdk, platform_name): + def check_simulator_ostype(self, sdk, platform_name, arch=platform.machine()): cmd = ['xcrun', 'simctl', 'list', '-j', 'devices'] self.trace(' '.join(cmd)) sim_devices_str = subprocess.check_output(cmd).decode("utf-8") @@ -48,8 +48,16 @@ def check_simulator_ostype(self, sdk, platform_name): self.assertIsNotNone(deviceUDID) exe_name = 'test_simulator_platform_{}'.format(platform_name) sdkroot = lldbutil.get_xcode_sdk_root(sdk) - self.build(dictionary={ 'EXE': exe_name, 'SDKROOT': sdkroot.strip(), - 'ARCH': platform.machine() }) + vers = lldbutil.get_xcode_sdk_version(sdk) + triple = '-'.join([arch, 'apple', platform_name + vers, 'simulator']) + version_min = '-m{}-simulator-version-min={}'.format(platform_name, vers) + self.build( + dictionary={ + 'EXE': exe_name, + 'SDKROOT': sdkroot.strip(), + 'ARCH': arch, + 'ARCH_CFLAGS': '-target {} {}'.format(triple, version_min), + }) exe_path = self.getBuildArtifact(exe_name) cmd = [ 'xcrun', 'simctl', 'spawn', '-s', deviceUDID, exe_path, @@ -132,4 +140,5 @@ def test_simulator_ostype_tvos(self): @skipIfRemote def test_simulator_ostype_watchos(self): self.check_simulator_ostype(sdk='watchsimulator', - platform_name='watchos') + platform_name='watchos', + arch='i386') _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits