https://github.com/python/cpython/commit/4ead357bae5ec30b78c8b06cc7f7c6bb4495d89c
commit: 4ead357bae5ec30b78c8b06cc7f7c6bb4495d89c
branch: 3.13
author: Russell Keith-Magee <[email protected]>
committer: freakboy3742 <[email protected]>
date: 2026-07-15T07:34:35+08:00
summary:

[3.13] gh-153631: Ensure iOS simulator is running before starting build 
(GH-153632) (#153675)

Makes a small change to the iOS build script to improve build stability.
xcodebuild doesn't guarantee that the CoreSimulatorService is running before
starting a simulator. If the service isn't running, xcodebuild reports that no
simulators are available, and fails to start the test app. However, simctl
blocks until the simulator is available, and simctl is used to evaluate the
default simulator. So - the iOS build script now unconditionally determines the
default simulator, even if a specific simulator is requested.
(cherry picked from commit 2dc1a91af801ea896e21f6c6e6cc41f57e8268d9)

files:
M iOS/testbed/__main__.py

diff --git a/iOS/testbed/__main__.py b/iOS/testbed/__main__.py
index 7fddc3c026d3d7a..4caa9e3dfdb6816 100644
--- a/iOS/testbed/__main__.py
+++ b/iOS/testbed/__main__.py
@@ -220,8 +220,14 @@ def run_testbed(simulator: str | None, args: list[str], 
verbose: bool = False):
     update_test_plan(location, args)
     print(" done.")
 
+    # xcodebuild doesn't guarantee that the CoreSimulatorService daemon is
+    # running prior to using a simulator, but calling `xcrun simctl list` does.
+    # Determining the default simulator that *would* be used is a cheap action;
+    # so use that as a way to ensure that the CoreSimulatorService daemon is
+    # running.
+    default_simulator = select_simulator_device()
     if simulator is None:
-        simulator = select_simulator_device()
+        simulator = default_simulator
     print(f"Running test on {simulator}")
 
     xcode_test(location, simulator=simulator, verbose=verbose)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to