pre boot ios simulator

This commit is contained in:
carzh 2025-02-04 14:46:54 -08:00
parent 9e18b6a0f3
commit 6f72c38e6a

View file

@ -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: