From 6f72c38e6a774ab43cd845165645e5a0a7ae7cc5 Mon Sep 17 00:00:00 2001 From: carzh Date: Tue, 4 Feb 2025 14:46:54 -0800 Subject: [PATCH] pre boot ios simulator --- tools/ci_build/github/apple/test_apple_packages.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/ci_build/github/apple/test_apple_packages.py b/tools/ci_build/github/apple/test_apple_packages.py index 14c0b46676..b5e18a2818 100644 --- a/tools/ci_build/github/apple/test_apple_packages.py +++ b/tools/ci_build/github/apple/test_apple_packages.py @@ -11,6 +11,7 @@ import shutil import subprocess import sys import tempfile +import time from c.assemble_c_pod_package import assemble_c_pod_package from package_assembly_utils import PackageVariant, gen_file_from_template, get_ort_version @@ -131,6 +132,13 @@ def _test_apple_packages(args): simulator_device_info = json.loads(simulator_device_info) + # Boot the simulator + boot_cmd = ["xcrun", "simctl", "boot", f"{simulator_device_info['device_udid']}"] + subprocess.run(boot_cmd, check=True) + + # Sleep for 15 seconds + time.sleep(15) + # Xcode UI tests seem to be flaky: https://github.com/orgs/community/discussions/68807 # Add a couple of retries if we get this error: # ios_package_testUITests-Runner Failed to initialize for UI testing: