[osx_sdk] Tolerate duplicate iOS runtime mounts
`install runtimes.verify and mount runtime <ver>` (`xcrun simctl runtime
add <dmg>`) sporadically fails with:
D: <NEW-UDID> iOS (26.2 - 23C54) (Unusable - Other Failure: Error
Domain=SimDiskImageErrorDomain Code=5 "Duplicate of <OLD-UDID>" ...)
Root cause (from the logs of Mac Engine Drone/2490338, Mac Production
Engine Drone/1058394 and /962544 - bb 8673724846373371889,
8673723958432320913, 8683257479423019809): the failure always happens in
the second `install runtimes` pass, right after `Cleaning up runtimes
cache` ran `simctl runtime delete all`. The cleanup considers the
runtimes unmounted as soon as `simctl list runtimes` stops listing them
(~16s), but `simctl runtime delete` is asynchronous: the disk image
stays registered in the `Deleting` state (visible in `simctl runtime
list`) for a while after that. Re-adding the identical dmg (~80s after
the delete in those builds) makes simctl register the new image as an
unusable "Duplicate of" the old one and exit 5. The "Duplicate of" text
only ever shows up in the stdout of `simctl runtime add`; it never
appears in `simctl list runtimes` output. mac_toolchain hit the same
problem and handles it by deleting the duplicate and retrying
(crbug.com/460133386).
Fix:
- Root cause: the post-cleanup wait (`_is_runtimes_unmounted`) now also
polls `xcrun simctl runtime list` ("list runtime disk images") and
keeps waiting while any image is `Deleting`, so the dmg is only
re-added once the old image is really gone.
- Tolerance: `verify and mount runtime` captures stdout and stderr and
no longer fails the build directly. If it fails with a "Duplicate of"
error, a nested "handle duplicate runtime <ver>" step waits for
pending deletions, re-runs `simctl list runtimes` and, if the runtime
build is listed, treats the error as benign. Otherwise it deletes the
disk images named in the error output (`simctl runtime delete
<UDID>`), waits for the deletions and retries the mount once; a second
failure is an INFRA_FAILURE. Any other mount error still fails as
before.
- `_is_runtime_mounted` is split into `_lookup_runtime_build_version`
and `_is_runtime_build_listed`; the latter ignores runtimes listed as
unavailable/unusable so a stale unusable duplicate is not mistaken
for a mounted runtime.
- Timeouts waiting for runtime deletion/unmount are now infra failures
(`InfraFailure` instead of `StepFailure`; `retry.basic_wrap` retries
both), so a bot that never finishes deleting an image is not reported
as a test failure.
Tests (recipe_modules/osx_sdk/examples/full.py):
- mac_13_runtime_duplicate_already_mounted: duplicate error, re-list
shows the runtime -> SUCCESS.
- mac_13_runtime_duplicate_retry_succeeds: duplicate error, image still
`Deleting`, runtime not listed -> delete UDIDs, retry mount ->
SUCCESS.
- mac_13_runtime_duplicate_retry_fails: retry also fails ->
INFRA_FAILURE.
- mac_13_runtime_mount_fails: non-duplicate mount error ->
INFRA_FAILURE.
- mac_13_runtime_listed_unavailable_is_mounted: runtime listed as
unavailable is (re)mounted.
- mac_13_explicit_runtime_version_clean: cleanup waits while a disk
image is `Deleting`.
- mac_13_runtime_duplicate_deletion_never_finishes,
mac_13_cleanup_runtime_deletion_never_finishes: the deletion wait
times out -> INFRA_FAILURE.
Bug: https://github.com/flutter/flutter/issues/180141
Change-Id: I1cfe3dd019ff37353e55271893b4bd86ce9dc6f8
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/82420
Reviewed-by: Victoria Ashworth <vashworth@google.com>
Commit-Queue: Elijah Okoroh <okorohelijah@google.com>
diff --git a/recipe_modules/osx_sdk/api.py b/recipe_modules/osx_sdk/api.py
index 0ced868..5fff9a3 100644
--- a/recipe_modules/osx_sdk/api.py
+++ b/recipe_modules/osx_sdk/api.py
@@ -8,6 +8,7 @@
Available only to Google-run bots."""
from contextlib import contextmanager
+import re
from recipe_engine import recipe_api
from datetime import datetime, timedelta
@@ -30,6 +31,18 @@
# runs there. See https://github.com/flutter/flutter/issues/192754.
_INTEL_MAX_XCODE_VERSION = '17c52'
+# Matches simulator runtime disk image UDIDs as printed by `simctl runtime`,
+# e.g. `D: 73EA5108-FE5E-4ADC-B6A6-D2FBE4448EA2 iOS (26.2 - 23C54) (Unusable -
+# Other Failure: ... "Duplicate of 30BC4E5F-DE5F-499A-93AF-22FEF83EF916" ...)`.
+_RUNTIME_UDID_RE = re.compile(
+ r'\b[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\b'
+)
+
+# Substring of the `simctl runtime add` output when the added image is a
+# duplicate of an already registered (possibly still deleting) image. See
+# https://github.com/flutter/flutter/issues/180141.
+_DUPLICATE_RUNTIME_ERROR = 'duplicate of'
+
class OSXSDKApi(recipe_api.RecipeApi):
"""API for using OS X SDK distributed via CIPD."""
@@ -733,18 +746,14 @@
status=self.m.step.INFRA_FAILURE,
)
- # Skip adding the runtime if it's already mounted
- if not self._is_runtime_mounted(runtime_version, xcode_version,
- runtime_simulators):
- self.m.step(
- 'verify and mount runtime %s' % version.lower(),
- [
- 'xcrun',
- 'simctl',
- 'runtime',
- 'add',
- runtime_dmg_path,
- ],
+ # Skip adding the runtime if it's already mounted.
+ ios_runtime_build_version = self._lookup_runtime_build_version(
+ runtime_version, xcode_version
+ )
+ if not self._is_runtime_build_listed(ios_runtime_build_version,
+ runtime_simulators):
+ self._mount_runtime(
+ version, runtime_dmg_path, ios_runtime_build_version
)
else:
@@ -877,7 +886,8 @@
if parsed_xcode_version >= self.m.version.parse('15.0.0'):
max_remaining_runtimes = 0
- # Wait up to ~5 minutes until runtimes are unmounted.
+ # Wait up to ~5 minutes until runtimes are unmounted and their disk
+ # images are fully deleted.
self.m.retry.basic_wrap(
lambda timeout: self._is_runtimes_unmounted(
max_remaining_runtimes,
@@ -902,32 +912,168 @@
# pylint: disable=unused-argument
def _is_runtimes_unmounted(self, max_remaining_runtimes, timeout=None):
- '''Check if more than one runtime is currently mounted. If more than one
- is mounted, raise a `StepFailure`.
+ '''Check if more than one runtime is currently mounted or if any runtime
+ disk image is still being deleted. If so, raise an `InfraFailure` (which
+ `retry.basic_wrap` retries; if it persists, the build is an infra failure
+ rather than a test failure).
Args:
max_remaining_runtimes: (int) How many runtimes are allowed to remain for
it to be considered done unmounting.
'''
- runtime_simulators = self.m.step(
+ runtime_simulators = self._list_runtimes()
+
+ if len(runtime_simulators[1:]) > max_remaining_runtimes:
+ raise self.m.step.InfraFailure('Runtimes not unmounted yet')
+
+ # `simctl list runtimes` stops listing a runtime as soon as it is unmounted,
+ # but `simctl runtime delete` keeps the disk image registered (in the
+ # `Deleting` state) until it has been fully removed. Re-adding the same
+ # image before that finishes makes simctl register the new image as an
+ # unusable "Duplicate of" the old one, which is the root cause of
+ # https://github.com/flutter/flutter/issues/180141.
+ self._is_runtime_deletion_complete()
+
+ def _list_runtimes(self):
+ """Runs `xcrun simctl list runtimes` and returns its output lines.
+
+ Example output:
+ [
+ "== Runtimes ==",
+ "iOS 16.2 (16.2 - 20C52) - com.apple.CoreSimulator.SimRuntime.iOS-16-2",
+ "iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4"
+ ]
+ """
+ return self.m.step(
'list runtimes', ['xcrun', 'simctl', 'list', 'runtimes'],
stdout=self.m.raw_io.output_text(add_output_log=True)
).stdout.splitlines()
- if len(runtime_simulators[1:]) > max_remaining_runtimes:
- raise self.m.step.StepFailure('Runtimes not unmounted yet')
+ # pylint: disable=unused-argument
+ def _is_runtime_deletion_complete(self, timeout=None):
+ """Check if any runtime disk image is still being deleted. If so, raise an
+ `InfraFailure`.
- def _is_runtime_mounted(
- self, runtime_version, xcode_version, runtime_simulators
+ Uses `xcrun simctl runtime list` (not `simctl list runtimes`), which
+ reports the state of each runtime disk image (e.g. `Ready`, `Deleting`,
+ `Unusable`).
+ """
+ disk_images = self.m.step(
+ 'list runtime disk images', ['xcrun', 'simctl', 'runtime', 'list'],
+ stdout=self.m.raw_io.output_text(add_output_log=True)
+ ).stdout
+
+ if 'Deleting' in disk_images:
+ raise self.m.step.InfraFailure('Runtime disk images not deleted yet')
+
+ def _wait_for_runtime_deletion(self):
+ """Waits up to ~5 minutes until no runtime disk image is being deleted."""
+ self.m.retry.basic_wrap(
+ lambda timeout: self._is_runtime_deletion_complete(timeout=timeout),
+ sleep=5.0,
+ backoff_factor=2,
+ max_attempts=7
+ )
+
+ def _mount_runtime(
+ self, version, runtime_dmg_path, ios_runtime_build_version
):
- """Determine if iOS runtime version is already mounted.
+ """Mounts an iOS runtime dmg with `simctl runtime add`.
+
+ `simctl runtime add` fails with an `Unusable - Other Failure: ...
+ "Duplicate of <UDID>"` error when an image with the same identity is still
+ registered, typically because a previous `simctl runtime delete` of that
+ image has not finished yet (deletion is asynchronous). The runtime may
+ nevertheless be usable, so rather than failing the build outright:
+ 1. wait for any pending deletions to finish,
+ 2. re-check `simctl list runtimes`; if the runtime is now listed, the
+ duplicate error was benign,
+ 3. otherwise delete the duplicate disk image(s) and retry the mount
+ once, failing the build if that also fails.
+ See https://github.com/flutter/flutter/issues/180141.
+
+ Args:
+ version: (string) The configured runtime version (e.g.
+ "ios-16-4_14e300c").
+ runtime_dmg_path: (string) Path to the runtime dmg to mount.
+ ios_runtime_build_version: (string) The iOS runtime build (e.g.
+ "20e247") used to verify whether the runtime is mounted.
+ """
+ step_name = 'verify and mount runtime %s' % version.lower()
+ cmd = ['xcrun', 'simctl', 'runtime', 'add', runtime_dmg_path]
+ result = self.m.step(
+ step_name,
+ cmd,
+ ok_ret='any',
+ stdout=self.m.raw_io.output_text(add_output_log=True),
+ stderr=self.m.raw_io.output_text(add_output_log=True),
+ )
+ if result.retcode == 0:
+ return
+
+ output = '%s\n%s' % (result.stdout, result.stderr)
+ if _DUPLICATE_RUNTIME_ERROR not in output.lower():
+ result.presentation.status = self.m.step.INFRA_FAILURE
+ self.m.step.empty(
+ 'Failed to mount runtime %s' % version.lower(),
+ status=self.m.step.INFRA_FAILURE,
+ step_text=output.strip(),
+ )
+
+ # The presentation can only be changed until the next step starts.
+ result.presentation.step_text = (
+ 'simctl reported a "Duplicate of" error (retcode %d); see the "handle '
+ 'duplicate runtime %s" step.' % (result.retcode, version.lower())
+ )
+
+ with self.m.step.nest('handle duplicate runtime %s' %
+ version.lower()) as display_step:
+ self._wait_for_runtime_deletion()
+
+ if self._is_runtime_build_listed(ios_runtime_build_version,
+ self._list_runtimes()):
+ display_step.step_text = (
+ 'Runtime %s (%s) is already mounted; ignoring benign "Duplicate '
+ 'of" error from simctl.' % (version, ios_runtime_build_version)
+ )
+ return
+
+ # The runtime is not usable, so the unusable duplicate (and the image it
+ # duplicates, which is not usable either since it is not listed) must be
+ # removed before the dmg can be added again.
+ for udid in self._parse_runtime_udids(output):
+ self.m.step(
+ 'delete runtime disk image %s' % udid,
+ ['xcrun', 'simctl', 'runtime', 'delete', udid],
+ ok_ret='any',
+ )
+ self._wait_for_runtime_deletion()
+
+ self.m.step('%s (retry)' % step_name, cmd)
+
+ def _parse_runtime_udids(self, output):
+ """Returns the unique runtime disk image UDIDs found in `output`, in order.
+
+ Args:
+ output: (string) Output of a `simctl runtime` command.
+ """
+ udids = []
+ for udid in _RUNTIME_UDID_RE.findall(output.upper()):
+ if udid not in udids:
+ udids.append(udid)
+ return udids
+
+ def _lookup_runtime_build_version(self, runtime_version, xcode_version):
+ """Looks up the iOS runtime build version from CIPD.
Args:
runtime_version: (string) The iOS version (e.g. "ios-16-4").
xcode_version: (string) The Xcode version (e.g. "14e300c").
- runtime_simulators: (list) A list of strings of runtime versions.
Returns:
- A boolean for whether or not the runtime is already mounted.
+ A string of the iOS runtime build version (e.g. "20e247").
+
+ Raises:
+ InfraFailure if the build version could not be determined.
"""
with self.m.step.nest('cipd describe %s_%s' %
@@ -954,10 +1100,28 @@
)
display_step.status = self.m.step.SUCCESS
- # Check if runtime is already mounted
+ return ios_runtime_build_version
+
+ def _is_runtime_build_listed(
+ self, ios_runtime_build_version, runtime_simulators
+ ):
+ """Determine if an iOS runtime build is listed as usable by
+ `simctl list runtimes`.
+
+ Args:
+ ios_runtime_build_version: (string) The iOS runtime build (e.g. "20e247").
+ runtime_simulators: (list) Output lines of `simctl list runtimes`.
+ Returns:
+ A boolean for whether or not the runtime is mounted and usable.
+ """
for runtime in runtime_simulators:
# Example runtime: `iOS 14.3 (14.3 - 18C61) - com.apple.CoreSimulator.SimRuntime.iOS-14-3`
- if ios_runtime_build_version.lower() in runtime.lower():
+ runtime = runtime.lower()
+ # A runtime reported as unavailable/unusable (e.g. an unusable duplicate
+ # disk image) does not count as mounted; it must be (re)mounted.
+ if 'unavailable' in runtime or 'unusable' in runtime:
+ continue
+ if ios_runtime_build_version.lower() in runtime:
return True
return False
diff --git a/recipe_modules/osx_sdk/examples/full.expected/explicit_package_source.json b/recipe_modules/osx_sdk/examples/full.expected/explicit_package_source.json
index 6cfcfba..71f08c2 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/explicit_package_source.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/explicit_package_source.json
@@ -240,6 +240,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -533,6 +547,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -804,6 +832,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
@@ -1063,6 +1105,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (4).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (4)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/explicit_version.json b/recipe_modules/osx_sdk/examples/full.expected/explicit_version.json
index 6a31ef1..b371253 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/explicit_version.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/explicit_version.json
@@ -240,6 +240,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -533,6 +547,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -804,6 +832,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
@@ -1063,6 +1105,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (4).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (4)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/intel_pins_xcode_to_17c52.json b/recipe_modules/osx_sdk/examples/full.expected/intel_pins_xcode_to_17c52.json
index c61abc6..70dc191 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/intel_pins_xcode_to_17c52.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/intel_pins_xcode_to_17c52.json
@@ -389,6 +389,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -660,6 +674,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -919,6 +947,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/kill_startup_assistant.json b/recipe_modules/osx_sdk/examples/full.expected/kill_startup_assistant.json
index 59d833e..067c88b 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/kill_startup_assistant.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/kill_startup_assistant.json
@@ -549,6 +549,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -877,6 +891,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -1136,6 +1164,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_already_reset_invalid date.json b/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_already_reset_invalid date.json
index 6901003..8a7fcd0 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_already_reset_invalid date.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_already_reset_invalid date.json
@@ -567,6 +567,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -895,6 +909,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -1154,6 +1182,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_reset_within_7_days.json b/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_reset_within_7_days.json
index 245cea8..f29d850 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_reset_within_7_days.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_reset_within_7_days.json
@@ -569,6 +569,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -897,6 +911,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -1156,6 +1184,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_reset_within_a_day.json b/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_reset_within_a_day.json
index d5a7a19..a47166c 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_reset_within_a_day.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/launch_services_unresponsive_mac_reset_within_a_day.json
@@ -569,6 +569,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -897,6 +911,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -1156,6 +1184,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_arm_host.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_arm_host.json
index 1728fda..c46699d 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/mac_13_arm_host.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_arm_host.json
@@ -382,6 +382,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -653,6 +667,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -912,6 +940,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_cleanup_no_runtimes.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_cleanup_no_runtimes.json
index 6a31ef1..b371253 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/mac_13_cleanup_no_runtimes.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_cleanup_no_runtimes.json
@@ -240,6 +240,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -533,6 +547,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -804,6 +832,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
@@ -1063,6 +1105,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (4).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (4)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_cleanup_runtime_deletion_never_finishes.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_cleanup_runtime_deletion_never_finishes.json
new file mode 100644
index 0000000..a94924f
--- /dev/null
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_cleanup_runtime_deletion_never_finishes.json
@@ -0,0 +1,472 @@
+[
+ {
+ "cmd": [
+ "sw_vers",
+ "-productVersion"
+ ],
+ "name": "find macOS version"
+ },
+ {
+ "cmd": [],
+ "name": "Pinning Xcode to 17c52 on Intel",
+ "~followup_annotations": [
+ "@@@STEP_TEXT@Requested Xcode deadbeef, but Intel bots cannot run macOS 26. See https://github.com/flutter/flutter/issues/192754.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "pgrep",
+ "Setup Assistant"
+ ],
+ "infra_step": true,
+ "name": "check for Setup Assistant",
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "verify launch services"
+ },
+ {
+ "cmd": [
+ "/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister",
+ "-kill",
+ "-r",
+ "-domain",
+ "local",
+ "-domain",
+ "system",
+ "-domain",
+ "user"
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Reset and rescan Launch Services db",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "log",
+ "show",
+ "--last",
+ "24h",
+ "--style",
+ "compact",
+ "--predicate",
+ "logType == \"error\" AND process == \"xcodebuild\" AND subsystem == \"com.apple.launchservices\" AND composedMessage CONTAINS \"disconnect event interruption received for service\""
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Check if xcodebuild impacted by Launch Services",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "rm",
+ "-rf",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up Xcode cache"
+ },
+ {
+ "cmd": [
+ "echo",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "show app_dir"
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache"
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk."
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk..Cache Micro Manager, cache directory exists check",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@Cache dir does not exist, skipping.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache (2)"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CACHE]/osx_sdk/xcode_17c52",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode.ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "install xcode.Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode.install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "Cleaning up runtimes cache",
+ "~followup_annotations": [
+ "@@@STEP_EXCEPTION@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.select xcode",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "delete",
+ "all"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.Cleaning up mounted simulator runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "xcodebuild",
+ "-version"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.check xcode version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@Xcode 15.0@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@Build version 15C500b@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes (2)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images (2)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes (3)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images (3)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes (4)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images (4)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes (5)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images (5)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "Cleaning up runtimes cache.sleep 80",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes (6)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images (6)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "Cleaning up runtimes cache.sleep 160",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes (7)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images (7)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode"
+ },
+ {
+ "failure": {
+ "humanReason": "Runtime disk images not deleted yet"
+ },
+ "name": "$result"
+ }
+]
\ No newline at end of file
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_already_mounted.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_already_mounted.json
index ae66416..05a4d70 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_already_mounted.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_already_mounted.json
@@ -672,6 +672,20 @@
},
{
"cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
"vpython3",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_clean.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_clean.json
index 1808374..751653c 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_clean.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_clean.json
@@ -277,6 +277,51 @@
},
{
"cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes (4)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images (2)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
"vpython3",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
@@ -425,7 +470,8 @@
"infra_step": true,
"name": "install runtimes.verify and mount runtime ios-16-4_14e300c",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
]
},
{
@@ -640,6 +686,20 @@
},
{
"cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
"vpython3",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
@@ -839,6 +899,20 @@
},
{
"cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
"vpython3",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_not_mounted.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_not_mounted.json
index 61cfb00..b5e0295 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_not_mounted.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_explicit_runtime_version_not_mounted.json
@@ -359,7 +359,8 @@
"infra_step": true,
"name": "install runtimes.verify and mount runtime ios-16-4_14e300c",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
]
},
{
@@ -685,6 +686,20 @@
},
{
"cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
"vpython3",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_already_mounted.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_already_mounted.json
new file mode 100644
index 0000000..e47cb49
--- /dev/null
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_already_mounted.json
@@ -0,0 +1,771 @@
+[
+ {
+ "cmd": [
+ "sw_vers",
+ "-productVersion"
+ ],
+ "name": "find macOS version"
+ },
+ {
+ "cmd": [],
+ "name": "Pinning Xcode to 17c52 on Intel",
+ "~followup_annotations": [
+ "@@@STEP_TEXT@Requested Xcode deadbeef, but Intel bots cannot run macOS 26. See https://github.com/flutter/flutter/issues/192754.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "pgrep",
+ "Setup Assistant"
+ ],
+ "infra_step": true,
+ "name": "check for Setup Assistant",
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "verify launch services"
+ },
+ {
+ "cmd": [
+ "/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister",
+ "-kill",
+ "-r",
+ "-domain",
+ "local",
+ "-domain",
+ "system",
+ "-domain",
+ "user"
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Reset and rescan Launch Services db",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "log",
+ "show",
+ "--last",
+ "24h",
+ "--style",
+ "compact",
+ "--predicate",
+ "logType == \"error\" AND process == \"xcodebuild\" AND subsystem == \"com.apple.launchservices\" AND composedMessage CONTAINS \"disconnect event interruption received for service\""
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Check if xcodebuild impacted by Launch Services",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "echo",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "show app_dir"
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache"
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk."
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk..Cache Micro Manager, cache directory exists check",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@Cache dir does not exist, skipping.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache (2)"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CACHE]/osx_sdk/xcode_17c52",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode.ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "install xcode.Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode.install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.select xcode",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install-runtime-dmg",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-runtime-version",
+ "ios-16-4",
+ "-xcode-version",
+ "14e300c",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.install xcode runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "listdir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list xcode runtime dmg ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/.cipd@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg@@@",
+ "@@@STEP_LOG_END@listdir@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "cipd",
+ "describe",
+ "infra_internal/ios/xcode/ios_runtime_dmg",
+ "-version",
+ "14e300c",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.cipd describe infra_internal/ios/xcode/ios_runtime_dmg",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"xxx\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_build:20e247\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_version:ios-16-4\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.runtime build version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_TEXT@20e247@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "add",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.verify and mount runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@simctl reported a \"Duplicate of\" error (retcode 5); see the \"handle duplicate runtime ios-16-4_14e300c\" step.@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@Runtime ios-16-4_14e300c (20e247) is already mounted; ignoring benign \"Duplicate of\" error from simctl.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Ready@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "killall",
+ "-9",
+ "-v",
+ "com.apple.CoreSimulator.CoreSimulatorDevice"
+ ],
+ "infra_step": true,
+ "name": "kill dart"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "select xcode"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "list simulators"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "gn",
+ "gen",
+ "out/Release"
+ ],
+ "name": "gn"
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "out/Release"
+ ],
+ "name": "ninja"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode (2)"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CLEANUP]/tmp_tmp_1/osx_sdk",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode (2).ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CLEANUP]/tmp_tmp_1/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "install xcode (2).Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CLEANUP]/tmp_tmp_1/osx_sdk/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "/opt/flutter/xcode/17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode (2).install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "killall",
+ "-9",
+ "-v",
+ "com.apple.CoreSimulator.CoreSimulatorDevice"
+ ],
+ "infra_step": true,
+ "name": "kill dart (2)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "/opt/flutter/xcode/17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "select xcode (2)"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "list simulators (2)"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "list runtimes (2)",
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "rmtree",
+ "/opt/flutter/xcode/17c52"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up Xcode cache"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode (3)"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CLEANUP]/tmp_tmp_2/osx_sdk",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode (3).ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CLEANUP]/tmp_tmp_2/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "install xcode (3).Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CLEANUP]/tmp_tmp_2/osx_sdk/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "/opt/flutter/xcode/17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode (3).install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "Cleaning up runtimes cache"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "/opt/flutter/xcode/17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.select xcode",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "delete",
+ "all"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.Cleaning up mounted simulator runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "xcodebuild",
+ "-version"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.check xcode version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "rmtree",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.Cleaning up runtime cache ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "killall",
+ "-9",
+ "-v",
+ "com.apple.CoreSimulator.CoreSimulatorDevice"
+ ],
+ "infra_step": true,
+ "name": "kill dart (3)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "/opt/flutter/xcode/17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "select xcode (3)"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "list simulators (3)"
+ },
+ {
+ "cmd": [
+ "gn",
+ "gen",
+ "out/Release"
+ ],
+ "name": "gn (2)"
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "out/Release"
+ ],
+ "name": "ninja (2)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode (2)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode (3)"
+ },
+ {
+ "name": "$result"
+ }
+]
\ No newline at end of file
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_deletion_never_finishes.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_deletion_never_finishes.json
new file mode 100644
index 0000000..d8ac4f2
--- /dev/null
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_deletion_never_finishes.json
@@ -0,0 +1,466 @@
+[
+ {
+ "cmd": [
+ "sw_vers",
+ "-productVersion"
+ ],
+ "name": "find macOS version"
+ },
+ {
+ "cmd": [],
+ "name": "Pinning Xcode to 17c52 on Intel",
+ "~followup_annotations": [
+ "@@@STEP_TEXT@Requested Xcode deadbeef, but Intel bots cannot run macOS 26. See https://github.com/flutter/flutter/issues/192754.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "pgrep",
+ "Setup Assistant"
+ ],
+ "infra_step": true,
+ "name": "check for Setup Assistant",
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "verify launch services"
+ },
+ {
+ "cmd": [
+ "/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister",
+ "-kill",
+ "-r",
+ "-domain",
+ "local",
+ "-domain",
+ "system",
+ "-domain",
+ "user"
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Reset and rescan Launch Services db",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "log",
+ "show",
+ "--last",
+ "24h",
+ "--style",
+ "compact",
+ "--predicate",
+ "logType == \"error\" AND process == \"xcodebuild\" AND subsystem == \"com.apple.launchservices\" AND composedMessage CONTAINS \"disconnect event interruption received for service\""
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Check if xcodebuild impacted by Launch Services",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "echo",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "show app_dir"
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache"
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk."
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk..Cache Micro Manager, cache directory exists check",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@Cache dir does not exist, skipping.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache (2)"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CACHE]/osx_sdk/xcode_17c52",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode.ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "install xcode.Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode.install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes",
+ "~followup_annotations": [
+ "@@@STEP_EXCEPTION@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.select xcode",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install-runtime-dmg",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-runtime-version",
+ "ios-16-4",
+ "-xcode-version",
+ "14e300c",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.install xcode runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "listdir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list xcode runtime dmg ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/.cipd@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg@@@",
+ "@@@STEP_LOG_END@listdir@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "cipd",
+ "describe",
+ "infra_internal/ios/xcode/ios_runtime_dmg",
+ "-version",
+ "14e300c",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.cipd describe infra_internal/ios/xcode/ios_runtime_dmg",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"xxx\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_build:20e247\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_version:ios-16-4\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.runtime build version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_TEXT@20e247@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "add",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.verify and mount runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@simctl reported a \"Duplicate of\" error (retcode 5); see the \"handle duplicate runtime ios-16-4_14e300c\" step.@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_EXCEPTION@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images (2)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images (3)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images (4)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images (5)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.sleep 80",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images (6)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.sleep 160",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images (7)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode"
+ },
+ {
+ "failure": {
+ "humanReason": "Runtime disk images not deleted yet"
+ },
+ "name": "$result"
+ }
+]
\ No newline at end of file
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_retry_fails.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_retry_fails.json
new file mode 100644
index 0000000..a86df21
--- /dev/null
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_retry_fails.json
@@ -0,0 +1,425 @@
+[
+ {
+ "cmd": [
+ "sw_vers",
+ "-productVersion"
+ ],
+ "name": "find macOS version"
+ },
+ {
+ "cmd": [],
+ "name": "Pinning Xcode to 17c52 on Intel",
+ "~followup_annotations": [
+ "@@@STEP_TEXT@Requested Xcode deadbeef, but Intel bots cannot run macOS 26. See https://github.com/flutter/flutter/issues/192754.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "pgrep",
+ "Setup Assistant"
+ ],
+ "infra_step": true,
+ "name": "check for Setup Assistant",
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "verify launch services"
+ },
+ {
+ "cmd": [
+ "/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister",
+ "-kill",
+ "-r",
+ "-domain",
+ "local",
+ "-domain",
+ "system",
+ "-domain",
+ "user"
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Reset and rescan Launch Services db",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "log",
+ "show",
+ "--last",
+ "24h",
+ "--style",
+ "compact",
+ "--predicate",
+ "logType == \"error\" AND process == \"xcodebuild\" AND subsystem == \"com.apple.launchservices\" AND composedMessage CONTAINS \"disconnect event interruption received for service\""
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Check if xcodebuild impacted by Launch Services",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "echo",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "show app_dir"
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache"
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk."
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk..Cache Micro Manager, cache directory exists check",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@Cache dir does not exist, skipping.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache (2)"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CACHE]/osx_sdk/xcode_17c52",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode.ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "install xcode.Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode.install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes",
+ "~followup_annotations": [
+ "@@@STEP_EXCEPTION@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.select xcode",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install-runtime-dmg",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-runtime-version",
+ "ios-16-4",
+ "-xcode-version",
+ "14e300c",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.install xcode runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "listdir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list xcode runtime dmg ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/.cipd@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg@@@",
+ "@@@STEP_LOG_END@listdir@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "cipd",
+ "describe",
+ "infra_internal/ios/xcode/ios_runtime_dmg",
+ "-version",
+ "14e300c",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.cipd describe infra_internal/ios/xcode/ios_runtime_dmg",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"xxx\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_build:20e247\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_version:ios-16-4\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.runtime build version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_TEXT@20e247@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "add",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.verify and mount runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@simctl reported a \"Duplicate of\" error (retcode 5); see the \"handle duplicate runtime ios-16-4_14e300c\" step.@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_EXCEPTION@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "delete",
+ "73EA5108-FE5E-4ADC-B6A6-D2FBE4448EA2"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.delete runtime disk image 73EA5108-FE5E-4ADC-B6A6-D2FBE4448EA2",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "delete",
+ "30BC4E5F-DE5F-499A-93AF-22FEF83EF916"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.delete runtime disk image 30BC4E5F-DE5F-499A-93AF-22FEF83EF916",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images (2)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "add",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.verify and mount runtime ios-16-4_14e300c (retry)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_EXCEPTION@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode"
+ },
+ {
+ "failure": {
+ "humanReason": "Infra Failure: Step('install runtimes.handle duplicate runtime ios-16-4_14e300c.verify and mount runtime ios-16-4_14e300c (retry)') (retcode: 5)"
+ },
+ "name": "$result"
+ }
+]
\ No newline at end of file
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_retry_succeeds.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_retry_succeeds.json
new file mode 100644
index 0000000..ae3a6f9
--- /dev/null
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_duplicate_retry_succeeds.json
@@ -0,0 +1,844 @@
+[
+ {
+ "cmd": [
+ "sw_vers",
+ "-productVersion"
+ ],
+ "name": "find macOS version"
+ },
+ {
+ "cmd": [],
+ "name": "Pinning Xcode to 17c52 on Intel",
+ "~followup_annotations": [
+ "@@@STEP_TEXT@Requested Xcode deadbeef, but Intel bots cannot run macOS 26. See https://github.com/flutter/flutter/issues/192754.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "pgrep",
+ "Setup Assistant"
+ ],
+ "infra_step": true,
+ "name": "check for Setup Assistant",
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "verify launch services"
+ },
+ {
+ "cmd": [
+ "/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister",
+ "-kill",
+ "-r",
+ "-domain",
+ "local",
+ "-domain",
+ "system",
+ "-domain",
+ "user"
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Reset and rescan Launch Services db",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "log",
+ "show",
+ "--last",
+ "24h",
+ "--style",
+ "compact",
+ "--predicate",
+ "logType == \"error\" AND process == \"xcodebuild\" AND subsystem == \"com.apple.launchservices\" AND composedMessage CONTAINS \"disconnect event interruption received for service\""
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Check if xcodebuild impacted by Launch Services",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "echo",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "show app_dir"
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache"
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk."
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk..Cache Micro Manager, cache directory exists check",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@Cache dir does not exist, skipping.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache (2)"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CACHE]/osx_sdk/xcode_17c52",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode.ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "install xcode.Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode.install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.select xcode",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install-runtime-dmg",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-runtime-version",
+ "ios-16-4",
+ "-xcode-version",
+ "14e300c",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.install xcode runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "listdir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list xcode runtime dmg ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/.cipd@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg@@@",
+ "@@@STEP_LOG_END@listdir@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "cipd",
+ "describe",
+ "infra_internal/ios/xcode/ios_runtime_dmg",
+ "-version",
+ "14e300c",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.cipd describe infra_internal/ios/xcode/ios_runtime_dmg",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"xxx\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_build:20e247\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_version:ios-16-4\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.runtime build version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_TEXT@20e247@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "add",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.verify and mount runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@simctl reported a \"Duplicate of\" error (retcode 5); see the \"handle duplicate runtime ios-16-4_14e300c\" step.@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@D: 73EA5108-FE5E-4ADC-B6A6-D2FBE4448EA2 iOS (16.4 - 20E247) (Unusable - Other Failure: Error Domain=SimDiskImageErrorDomain Code=5 \"Duplicate of 30BC4E5F-DE5F-499A-93AF-22FEF83EF916\" UserInfo={NSLocalizedDescription=Duplicate of 30BC4E5F-DE5F-499A-93AF-22FEF83EF916, unusableErrorDetail=})@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 6.6GB - Deleting@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 0 bytes - Unusable - Other Failure: Duplicate of 30BC4E5F-DE5F-499A-93AF-22FEF83EF916@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images (2)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Disk Images ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (20E247) - 0 bytes - Unusable - Other Failure: Duplicate of 30BC4E5F-DE5F-499A-93AF-22FEF83EF916@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4 (unavailable, runtime is unusable)@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "delete",
+ "73EA5108-FE5E-4ADC-B6A6-D2FBE4448EA2"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.delete runtime disk image 73EA5108-FE5E-4ADC-B6A6-D2FBE4448EA2",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "delete",
+ "30BC4E5F-DE5F-499A-93AF-22FEF83EF916"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.delete runtime disk image 30BC4E5F-DE5F-499A-93AF-22FEF83EF916",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images (3)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "add",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.handle duplicate runtime ios-16-4_14e300c.verify and mount runtime ios-16-4_14e300c (retry)",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "killall",
+ "-9",
+ "-v",
+ "com.apple.CoreSimulator.CoreSimulatorDevice"
+ ],
+ "infra_step": true,
+ "name": "kill dart"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "select xcode"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "list simulators"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "gn",
+ "gen",
+ "out/Release"
+ ],
+ "name": "gn"
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "out/Release"
+ ],
+ "name": "ninja"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode (2)"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CLEANUP]/tmp_tmp_1/osx_sdk",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode (2).ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CLEANUP]/tmp_tmp_1/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "install xcode (2).Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CLEANUP]/tmp_tmp_1/osx_sdk/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "/opt/flutter/xcode/17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode (2).install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "killall",
+ "-9",
+ "-v",
+ "com.apple.CoreSimulator.CoreSimulatorDevice"
+ ],
+ "infra_step": true,
+ "name": "kill dart (2)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "/opt/flutter/xcode/17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "select xcode (2)"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "list simulators (2)"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "list runtimes (2)",
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "rmtree",
+ "/opt/flutter/xcode/17c52"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up Xcode cache"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode (3)"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CLEANUP]/tmp_tmp_2/osx_sdk",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode (3).ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CLEANUP]/tmp_tmp_2/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "install xcode (3).Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CLEANUP]/tmp_tmp_2/osx_sdk/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "/opt/flutter/xcode/17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode (3).install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "Cleaning up runtimes cache"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "/opt/flutter/xcode/17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.select xcode",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "delete",
+ "all"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.Cleaning up mounted simulator runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "xcodebuild",
+ "-version"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.check xcode version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "rmtree",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.Cleaning up runtime cache ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "killall",
+ "-9",
+ "-v",
+ "com.apple.CoreSimulator.CoreSimulatorDevice"
+ ],
+ "infra_step": true,
+ "name": "kill dart (3)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "/opt/flutter/xcode/17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "select xcode (3)"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "list simulators (3)"
+ },
+ {
+ "cmd": [
+ "gn",
+ "gen",
+ "out/Release"
+ ],
+ "name": "gn (2)"
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "out/Release"
+ ],
+ "name": "ninja (2)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode (2)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode (3)"
+ },
+ {
+ "name": "$result"
+ }
+]
\ No newline at end of file
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_listed_unavailable_is_mounted.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_listed_unavailable_is_mounted.json
new file mode 100644
index 0000000..9f51f23
--- /dev/null
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_listed_unavailable_is_mounted.json
@@ -0,0 +1,731 @@
+[
+ {
+ "cmd": [
+ "sw_vers",
+ "-productVersion"
+ ],
+ "name": "find macOS version"
+ },
+ {
+ "cmd": [],
+ "name": "Pinning Xcode to 17c52 on Intel",
+ "~followup_annotations": [
+ "@@@STEP_TEXT@Requested Xcode deadbeef, but Intel bots cannot run macOS 26. See https://github.com/flutter/flutter/issues/192754.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "pgrep",
+ "Setup Assistant"
+ ],
+ "infra_step": true,
+ "name": "check for Setup Assistant",
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "verify launch services"
+ },
+ {
+ "cmd": [
+ "/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister",
+ "-kill",
+ "-r",
+ "-domain",
+ "local",
+ "-domain",
+ "system",
+ "-domain",
+ "user"
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Reset and rescan Launch Services db",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "log",
+ "show",
+ "--last",
+ "24h",
+ "--style",
+ "compact",
+ "--predicate",
+ "logType == \"error\" AND process == \"xcodebuild\" AND subsystem == \"com.apple.launchservices\" AND composedMessage CONTAINS \"disconnect event interruption received for service\""
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Check if xcodebuild impacted by Launch Services",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "echo",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "show app_dir"
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache"
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk."
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk..Cache Micro Manager, cache directory exists check",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@Cache dir does not exist, skipping.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache (2)"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CACHE]/osx_sdk/xcode_17c52",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode.ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "install xcode.Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode.install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.select xcode",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4 (unavailable, runtime profile not found)@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install-runtime-dmg",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-runtime-version",
+ "ios-16-4",
+ "-xcode-version",
+ "14e300c",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.install xcode runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "listdir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list xcode runtime dmg ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/.cipd@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg@@@",
+ "@@@STEP_LOG_END@listdir@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "cipd",
+ "describe",
+ "infra_internal/ios/xcode/ios_runtime_dmg",
+ "-version",
+ "14e300c",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.cipd describe infra_internal/ios/xcode/ios_runtime_dmg",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"xxx\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_build:20e247\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_version:ios-16-4\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.runtime build version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_TEXT@20e247@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "add",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.verify and mount runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "killall",
+ "-9",
+ "-v",
+ "com.apple.CoreSimulator.CoreSimulatorDevice"
+ ],
+ "infra_step": true,
+ "name": "kill dart"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "select xcode"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "list simulators"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "gn",
+ "gen",
+ "out/Release"
+ ],
+ "name": "gn"
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "out/Release"
+ ],
+ "name": "ninja"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode (2)"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CLEANUP]/tmp_tmp_1/osx_sdk",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode (2).ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CLEANUP]/tmp_tmp_1/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "install xcode (2).Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CLEANUP]/tmp_tmp_1/osx_sdk/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "/opt/flutter/xcode/17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode (2).install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "killall",
+ "-9",
+ "-v",
+ "com.apple.CoreSimulator.CoreSimulatorDevice"
+ ],
+ "infra_step": true,
+ "name": "kill dart (2)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "/opt/flutter/xcode/17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "select xcode (2)"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "list simulators (2)"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "list runtimes (2)",
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "rmtree",
+ "/opt/flutter/xcode/17c52"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up Xcode cache"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode (3)"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CLEANUP]/tmp_tmp_2/osx_sdk",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode (3).ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CLEANUP]/tmp_tmp_2/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "install xcode (3).Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CLEANUP]/tmp_tmp_2/osx_sdk/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "/opt/flutter/xcode/17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode (3).install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "Cleaning up runtimes cache"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "/opt/flutter/xcode/17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.select xcode",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "delete",
+ "all"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.Cleaning up mounted simulator runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "xcodebuild",
+ "-version"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.check xcode version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "rmtree",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.Cleaning up runtime cache ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "killall",
+ "-9",
+ "-v",
+ "com.apple.CoreSimulator.CoreSimulatorDevice"
+ ],
+ "infra_step": true,
+ "name": "kill dart (3)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "/opt/flutter/xcode/17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "select xcode (3)"
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "list simulators (3)"
+ },
+ {
+ "cmd": [
+ "gn",
+ "gen",
+ "out/Release"
+ ],
+ "name": "gn (2)"
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "out/Release"
+ ],
+ "name": "ninja (2)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode (2)"
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode (3)"
+ },
+ {
+ "name": "$result"
+ }
+]
\ No newline at end of file
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_mount_fails.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_mount_fails.json
new file mode 100644
index 0000000..e708e0f
--- /dev/null
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_runtime_mount_fails.json
@@ -0,0 +1,342 @@
+[
+ {
+ "cmd": [
+ "sw_vers",
+ "-productVersion"
+ ],
+ "name": "find macOS version"
+ },
+ {
+ "cmd": [],
+ "name": "Pinning Xcode to 17c52 on Intel",
+ "~followup_annotations": [
+ "@@@STEP_TEXT@Requested Xcode deadbeef, but Intel bots cannot run macOS 26. See https://github.com/flutter/flutter/issues/192754.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "pgrep",
+ "Setup Assistant"
+ ],
+ "infra_step": true,
+ "name": "check for Setup Assistant",
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "verify launch services"
+ },
+ {
+ "cmd": [
+ "/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister",
+ "-kill",
+ "-r",
+ "-domain",
+ "local",
+ "-domain",
+ "system",
+ "-domain",
+ "user"
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Reset and rescan Launch Services db",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "log",
+ "show",
+ "--last",
+ "24h",
+ "--style",
+ "compact",
+ "--predicate",
+ "logType == \"error\" AND process == \"xcodebuild\" AND subsystem == \"com.apple.launchservices\" AND composedMessage CONTAINS \"disconnect event interruption received for service\""
+ ],
+ "infra_step": true,
+ "name": "verify launch services.Check if xcodebuild impacted by Launch Services",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "echo",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "show app_dir"
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache"
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk."
+ },
+ {
+ "cmd": [],
+ "name": "Running Cache Micro Manager on [CACHE]/osx_sdk..Cache Micro Manager, cache directory exists check",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@Cache dir does not exist, skipping.@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk"
+ ],
+ "infra_step": true,
+ "name": "Show xcode cache (2)"
+ },
+ {
+ "cmd": [],
+ "name": "install xcode"
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CACHE]/osx_sdk/xcode_17c52",
+ "-ensure-file",
+ "infra/tools/mac_toolchain/${platform} 123abc",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install xcode.ensure_installed",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-123abc----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/mac_toolchain/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "ls",
+ "-al",
+ "[CACHE]/osx_sdk/xcode_17c52"
+ ],
+ "infra_step": true,
+ "name": "install xcode.Show tool_dir cache",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install",
+ "-kind",
+ "mac",
+ "-xcode-version",
+ "17c52",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-with-runtime=False",
+ "-with-metal-toolchain=True",
+ "-verbose"
+ ],
+ "infra_step": true,
+ "name": "install xcode.install xcode from cipd",
+ "timeout": 1800,
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes",
+ "~followup_annotations": [
+ "@@@STEP_EXCEPTION@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--switch",
+ "[CACHE]/osx_sdk/xcode_17c52/XCode.app"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.select xcode",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "list",
+ "runtimes"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list runtimes",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@== Runtimes ==@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/osx_sdk/xcode_17c52/mac_toolchain",
+ "install-runtime-dmg",
+ "-cipd-package-prefix",
+ "infra_internal/ios/xcode",
+ "-runtime-version",
+ "ios-16-4",
+ "-xcode-version",
+ "14e300c",
+ "-output-dir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.install xcode runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "vpython3",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "listdir",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.list xcode runtime dmg ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/.cipd@@@",
+ "@@@STEP_LOG_LINE@listdir@[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg@@@",
+ "@@@STEP_LOG_END@listdir@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "cipd",
+ "describe",
+ "infra_internal/ios/xcode/ios_runtime_dmg",
+ "-version",
+ "14e300c",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.cipd describe infra_internal/ios/xcode/ios_runtime_dmg",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"xxx\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_build:20e247\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ },@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": \"xxx\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"ios_runtime_version:ios-16-4\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.cipd describe ios-16-4_14e300c.runtime build version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_TEXT@20e247@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "add",
+ "[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg"
+ ],
+ "infra_step": true,
+ "name": "install runtimes.verify and mount runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@raw_io.output_text@Error Domain=SimDiskImageErrorDomain Code=1 \"Unable to verify image\"@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@",
+ "@@@STEP_EXCEPTION@@@"
+ ]
+ },
+ {
+ "cmd": [],
+ "name": "install runtimes.Failed to mount runtime ios-16-4_14e300c",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_TEXT@Error Domain=SimDiskImageErrorDomain Code=1 \"Unable to verify image\"@@@",
+ "@@@STEP_EXCEPTION@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "sudo",
+ "xcode-select",
+ "--reset"
+ ],
+ "infra_step": true,
+ "name": "reset XCode"
+ },
+ {
+ "failure": {
+ "humanReason": "Infra Failure: Step('install runtimes.Failed to mount runtime ios-16-4_14e300c') (retcode: 0)"
+ },
+ "name": "$result"
+ }
+]
\ No newline at end of file
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_13_x86_host.json b/recipe_modules/osx_sdk/examples/full.expected/mac_13_x86_host.json
index 34698a1..b7f4468 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/mac_13_x86_host.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_13_x86_host.json
@@ -389,6 +389,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -660,6 +674,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -919,6 +947,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_26_launch_services_errors_without_reset.json b/recipe_modules/osx_sdk/examples/full.expected/mac_26_launch_services_errors_without_reset.json
index ad8aad1..9da9ffa 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/mac_26_launch_services_errors_without_reset.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_26_launch_services_errors_without_reset.json
@@ -537,6 +537,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -865,6 +879,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -1124,6 +1152,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/mac_26_skips_launch_services_reset.json b/recipe_modules/osx_sdk/examples/full.expected/mac_26_skips_launch_services_reset.json
index f5e78ff..7db5245 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/mac_26_skips_launch_services_reset.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/mac_26_skips_launch_services_reset.json
@@ -530,6 +530,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -858,6 +872,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -1117,6 +1145,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/no_runtime_version.json b/recipe_modules/osx_sdk/examples/full.expected/no_runtime_version.json
index f47ce92..6aa5143 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/no_runtime_version.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/no_runtime_version.json
@@ -521,6 +521,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -849,6 +863,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -1108,6 +1136,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/unavailable_runtime_arm_on_intel.json b/recipe_modules/osx_sdk/examples/full.expected/unavailable_runtime_arm_on_intel.json
index 5306ea6..d339f80 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/unavailable_runtime_arm_on_intel.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/unavailable_runtime_arm_on_intel.json
@@ -391,6 +391,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -662,6 +676,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.expected/xcode_install_fails_passes_on_retry.json b/recipe_modules/osx_sdk/examples/full.expected/xcode_install_fails_passes_on_retry.json
index 61f314b..15b1c07 100644
--- a/recipe_modules/osx_sdk/examples/full.expected/xcode_install_fails_passes_on_retry.json
+++ b/recipe_modules/osx_sdk/examples/full.expected/xcode_install_fails_passes_on_retry.json
@@ -484,6 +484,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
@@ -900,6 +914,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (2).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (2)"
},
@@ -1228,6 +1256,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (3).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (3)"
},
@@ -1487,6 +1529,20 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "infra_step": true,
+ "name": "Cleaning up runtimes cache (4).list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes (4)"
},
diff --git a/recipe_modules/osx_sdk/examples/full.py b/recipe_modules/osx_sdk/examples/full.py
index fca51d6..81aa286 100644
--- a/recipe_modules/osx_sdk/examples/full.py
+++ b/recipe_modules/osx_sdk/examples/full.py
@@ -24,6 +24,120 @@
return_value=datetime(2023, 12, 15, 13, 43, 21, 621929)
) # 2023-12-15 13:43:21
+# Output of `xcrun simctl runtime add` when the image is a duplicate of one
+# that is still registered (e.g. still being deleted). Copied from the failing
+# build in https://github.com/flutter/flutter/issues/180141.
+_DUPLICATE_RUNTIME_OUTPUT = (
+ 'D: 73EA5108-FE5E-4ADC-B6A6-D2FBE4448EA2 iOS (16.4 - 20E247) (Unusable - '
+ 'Other Failure: Error Domain=SimDiskImageErrorDomain Code=5 "Duplicate of '
+ '30BC4E5F-DE5F-499A-93AF-22FEF83EF916" UserInfo={NSLocalizedDescription='
+ 'Duplicate of 30BC4E5F-DE5F-499A-93AF-22FEF83EF916, unusableErrorDetail=})'
+)
+
+_RUNTIME_16_4_LISTED = (
+ '== Runtimes ==\n' +
+ 'iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4'
+)
+
+_RUNTIME_DMG_CIPD_DESCRIPTION = {
+ 'result': {
+ 'pin': {
+ 'package': 'xxx',
+ 'instance_id': 'xxx'
+ },
+ 'registered_by':
+ 'xxx',
+ 'registered_ts':
+ 'xxx',
+ 'tags': [
+ {
+ 'tag': 'ios_runtime_build:20e247',
+ 'registered_by': 'xxx',
+ 'registered_ts': 'xxx'
+ },
+ {
+ 'tag': 'ios_runtime_version:ios-16-4',
+ 'registered_by': 'xxx',
+ 'registered_ts': 'xxx'
+ },
+ ],
+ }
+}
+
+# Number of `list runtime disk images` attempts made while waiting for runtime
+# deletions to finish (`max_attempts` of the `retry.basic_wrap` in
+# `_wait_for_runtime_deletion` / the runtimes cache cleanup).
+_DELETION_WAIT_ATTEMPTS = 7
+
+_RUNTIME_DISK_IMAGE_DELETING = (
+ '== Disk Images ==\n' + 'iOS 16.4 (20E247) - 6.6GB - Deleting'
+)
+
+
+def _runtime_disk_images_deleting(api, step_name, attempts):
+ """Test data making `attempts` consecutive `list runtime disk images` steps
+ (named `step_name`, `step_name (2)`, ...) report an image being deleted.
+ """
+ test_data = api.empty_test_data()
+ for attempt in range(attempts):
+ name = step_name if attempt == 0 else '%s (%d)' % (step_name, attempt + 1)
+ test_data += api.step_data(
+ name, stdout=api.raw_io.output_text(_RUNTIME_DISK_IMAGE_DELETING)
+ )
+ return test_data
+
+
+def _mac_13_runtime_not_mounted(
+ api, install_list_runtimes='== Runtimes ==\n', fails=False
+):
+ """Test data for a macOS 13 host with one explicit runtime that is not
+ mounted yet, so that `install runtimes` has to mount the dmg.
+
+ Args:
+ install_list_runtimes: (string) Output of `install runtimes.list runtimes`.
+ fails: (bool) Whether the test is expected to fail before the runtimes
+ are listed again after the Xcode setup.
+ """
+ test_data = [
+ api.platform.name('mac'),
+ api.step_data(
+ "find macOS version",
+ stdout=api.raw_io.output_text("13.5.1"),
+ ),
+ api.properties(
+ **{
+ '$flutter/osx_sdk': {
+ 'sdk_version': 'deadbeef',
+ 'toolchain_ver_intel': '123abc',
+ 'runtime_versions': ['ios-16-4_14e300c']
+ }
+ }
+ ),
+ api.step_data(
+ 'install runtimes.list runtimes',
+ stdout=api.raw_io.output_text(install_list_runtimes)
+ ),
+ api.step_data(
+ 'install runtimes.list xcode runtime dmg ios-16-4_14e300c',
+ stdout=api.raw_io.output_text(
+ '[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/.cipd\n' +
+ '[CACHE]/osx_sdk/xcode_runtime_dmg_ios-16-4_14e300c/iOS_16-4.dmg'
+ )
+ ),
+ api.step_data(
+ 'install runtimes.cipd describe ios-16-4_14e300c.cipd describe infra_internal/ios/xcode/ios_runtime_dmg',
+ api.json.output(_RUNTIME_DMG_CIPD_DESCRIPTION),
+ ),
+ ]
+ if not fails:
+ test_data.append(
+ api.step_data(
+ 'list runtimes',
+ stdout=api.raw_io.output_text(_RUNTIME_16_4_LISTED)
+ )
+ )
+ return sum(test_data, api.empty_test_data())
+
def RunSteps(api):
api.osx_sdk.now = _MOCK_TIME_NOW
@@ -294,6 +408,175 @@
),
)
+ # Tests for https://github.com/flutter/flutter/issues/180141: `simctl runtime
+ # add` fails with a "Duplicate of <UDID>" error.
+
+ # (a) The duplicate error is benign: the runtime is listed after re-checking.
+ yield api.test(
+ 'mac_13_runtime_duplicate_already_mounted',
+ _mac_13_runtime_not_mounted(api),
+ api.step_data(
+ 'install runtimes.verify and mount runtime ios-16-4_14e300c',
+ retcode=5,
+ stdout=api.raw_io.output_text(_DUPLICATE_RUNTIME_OUTPUT),
+ ),
+ api.step_data(
+ 'install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images',
+ stdout=api.raw_io.output_text(
+ '== Disk Images ==\n' +
+ 'iOS 16.4 (20E247) - 6.6GB - Ready'
+ )
+ ),
+ api.step_data(
+ 'install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtimes',
+ stdout=api.raw_io.output_text(_RUNTIME_16_4_LISTED)
+ ),
+ )
+
+ # (b) The runtime is not listed after the duplicate error (the duplicated
+ # image was still being deleted): the duplicate images are deleted and the
+ # mount is retried successfully.
+ yield api.test(
+ 'mac_13_runtime_duplicate_retry_succeeds',
+ _mac_13_runtime_not_mounted(api),
+ api.step_data(
+ 'install runtimes.verify and mount runtime ios-16-4_14e300c',
+ retcode=5,
+ stderr=api.raw_io.output_text(_DUPLICATE_RUNTIME_OUTPUT),
+ ),
+ api.step_data(
+ 'install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images',
+ stdout=api.raw_io.output_text(
+ '== Disk Images ==\n' +
+ 'iOS 16.4 (20E247) - 6.6GB - Deleting\n' +
+ 'iOS 16.4 (20E247) - 0 bytes - Unusable - Other Failure: Duplicate of 30BC4E5F-DE5F-499A-93AF-22FEF83EF916'
+ )
+ ),
+ api.step_data(
+ 'install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images (2)',
+ stdout=api.raw_io.output_text(
+ '== Disk Images ==\n' +
+ 'iOS 16.4 (20E247) - 0 bytes - Unusable - Other Failure: Duplicate of 30BC4E5F-DE5F-499A-93AF-22FEF83EF916'
+ )
+ ),
+ api.step_data(
+ 'install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtimes',
+ stdout=api.raw_io.output_text(
+ '== Runtimes ==\n' +
+ 'iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4 (unavailable, runtime is unusable)'
+ )
+ ),
+ api.step_data(
+ 'install runtimes.handle duplicate runtime ios-16-4_14e300c.delete runtime disk image 30BC4E5F-DE5F-499A-93AF-22FEF83EF916',
+ retcode=2,
+ stdout=api.raw_io.output_text('No matching images found to delete'),
+ ),
+ )
+
+ # (c) The duplicate error persists after deleting the duplicate images and
+ # retrying: the build fails with an infra failure.
+ yield api.test(
+ 'mac_13_runtime_duplicate_retry_fails',
+ _mac_13_runtime_not_mounted(api, fails=True),
+ api.step_data(
+ 'install runtimes.verify and mount runtime ios-16-4_14e300c',
+ retcode=5,
+ stdout=api.raw_io.output_text(_DUPLICATE_RUNTIME_OUTPUT),
+ ),
+ api.step_data(
+ 'install runtimes.handle duplicate runtime ios-16-4_14e300c.verify and mount runtime ios-16-4_14e300c (retry)',
+ retcode=5,
+ stdout=api.raw_io.output_text(_DUPLICATE_RUNTIME_OUTPUT),
+ ),
+ status='INFRA_FAILURE',
+ )
+
+ # (d) A mount failure that is not a duplicate error still fails the build.
+ yield api.test(
+ 'mac_13_runtime_mount_fails',
+ _mac_13_runtime_not_mounted(api, fails=True),
+ api.step_data(
+ 'install runtimes.verify and mount runtime ios-16-4_14e300c',
+ retcode=1,
+ stderr=api.raw_io.output_text(
+ 'Error Domain=SimDiskImageErrorDomain Code=1 "Unable to verify image"'
+ ),
+ ),
+ status='INFRA_FAILURE',
+ )
+
+ # (e) A runtime that is listed but unavailable does not count as mounted and
+ # is mounted again.
+ yield api.test(
+ 'mac_13_runtime_listed_unavailable_is_mounted',
+ _mac_13_runtime_not_mounted(
+ api,
+ install_list_runtimes=(
+ '== Runtimes ==\n' +
+ 'iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4 (unavailable, runtime profile not found)'
+ )
+ ),
+ api.post_process(
+ post_process.MustRun,
+ 'install runtimes.verify and mount runtime ios-16-4_14e300c'
+ ),
+ )
+
+ # (f) The duplicated image never leaves the `Deleting` state within the
+ # wait: the build fails with an infra failure (not a test failure).
+ yield api.test(
+ 'mac_13_runtime_duplicate_deletion_never_finishes',
+ _mac_13_runtime_not_mounted(api, fails=True),
+ api.step_data(
+ 'install runtimes.verify and mount runtime ios-16-4_14e300c',
+ retcode=5,
+ stdout=api.raw_io.output_text(_DUPLICATE_RUNTIME_OUTPUT),
+ ),
+ _runtime_disk_images_deleting(
+ api,
+ 'install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtime disk images',
+ _DELETION_WAIT_ATTEMPTS,
+ ),
+ api.post_process(
+ post_process.DoesNotRun,
+ 'install runtimes.handle duplicate runtime ios-16-4_14e300c.list runtimes'
+ ),
+ status='INFRA_FAILURE',
+ )
+
+ # (g) After `simctl runtime delete all`, a disk image never leaves the
+ # `Deleting` state within the wait: the build fails with an infra failure.
+ yield api.test(
+ 'mac_13_cleanup_runtime_deletion_never_finishes',
+ api.platform.name('mac'),
+ api.step_data(
+ "find macOS version",
+ stdout=api.raw_io.output_text("13.5.1"),
+ ),
+ api.properties(
+ **{
+ '$flutter/osx_sdk': {
+ 'sdk_version': 'deadbeef',
+ 'toolchain_ver_intel': '123abc',
+ 'runtime_versions': ['ios-16-4_14e300c'],
+ 'cleanup_cache': True,
+ }
+ }
+ ),
+ api.step_data(
+ 'Cleaning up runtimes cache.check xcode version',
+ stdout=api.raw_io
+ .output_text('Xcode 15.0\n' + 'Build version 15C500b')
+ ),
+ _runtime_disk_images_deleting(
+ api,
+ 'Cleaning up runtimes cache.list runtime disk images',
+ _DELETION_WAIT_ATTEMPTS,
+ ),
+ api.post_process(post_process.DoesNotRun, 'install runtimes'),
+ status='INFRA_FAILURE',
+ )
+
yield api.test(
'mac_13_explicit_runtime_version_build_verion_failure',
api.platform.name('mac'),
@@ -420,6 +703,20 @@
'iOS 16.4 (16.2 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4'
)
),
+ # The runtime is no longer listed but its disk image is still being
+ # deleted; the cleanup must wait for the deletion to finish to avoid
+ # a "Duplicate of" error when the dmg is added again.
+ api.step_data(
+ 'Cleaning up runtimes cache.list runtime disk images',
+ stdout=api.raw_io.output_text(
+ '== Disk Images ==\n' +
+ 'iOS 16.4 (20E247) - 6.6GB - Deleting'
+ )
+ ),
+ api.step_data(
+ 'Cleaning up runtimes cache.list runtime disk images (2)',
+ stdout=api.raw_io.output_text('== Disk Images ==\n')
+ ),
api.step_data(
'install runtimes.list xcode runtime dmg ios-16-4_14e300c',
stdout=api.raw_io.output_text(
diff --git a/recipes/devicelab/devicelab_drone_build_test.expected/xcode-mac.json b/recipes/devicelab/devicelab_drone_build_test.expected/xcode-mac.json
index 57f7324..3c04aa9 100644
--- a/recipes/devicelab/devicelab_drone_build_test.expected/xcode-mac.json
+++ b/recipes/devicelab/devicelab_drone_build_test.expected/xcode-mac.json
@@ -1710,6 +1710,53 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+ "env": {
+ "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+ "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+ "GIT_BRANCH": "master",
+ "LUCI_BRANCH": "",
+ "LUCI_CI": "True",
+ "LUCI_PR": "",
+ "OS": "darwin",
+ "PUB_CACHE": "[START_DIR]/.pub-cache",
+ "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+ "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk"
+ },
+ "env_prefixes": {
+ "PATH": [
+ "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+ "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin",
+ "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+ "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+ ]
+ },
+ "infra_step": true,
+ "luci_context": {
+ "realm": {
+ "name": "project:ci"
+ },
+ "resultdb": {
+ "current_invocation": {
+ "name": "invocations/build:8945511751514863184",
+ "update_token": "token"
+ },
+ "hostname": "rdbhost"
+ }
+ },
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},
diff --git a/recipes/devicelab/devicelab_test_drone.expected/mac.json b/recipes/devicelab/devicelab_test_drone.expected/mac.json
index 01263ef..771fdc5 100644
--- a/recipes/devicelab/devicelab_test_drone.expected/mac.json
+++ b/recipes/devicelab/devicelab_test_drone.expected/mac.json
@@ -1409,6 +1409,53 @@
]
},
{
+ "cmd": [
+ "xcrun",
+ "simctl",
+ "runtime",
+ "list"
+ ],
+ "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+ "env": {
+ "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+ "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+ "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+ "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+ "GIT_BRANCH": "master",
+ "LUCI_BRANCH": "",
+ "LUCI_CI": "True",
+ "LUCI_PR": "",
+ "OS": "darwin",
+ "PUB_CACHE": "[START_DIR]/.pub-cache",
+ "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+ "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk"
+ },
+ "env_prefixes": {
+ "PATH": [
+ "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+ "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+ ]
+ },
+ "infra_step": true,
+ "luci_context": {
+ "realm": {
+ "name": "project:ci"
+ },
+ "resultdb": {
+ "current_invocation": {
+ "name": "invocations/build:8945511751514863184",
+ "update_token": "token"
+ },
+ "hostname": "rdbhost"
+ }
+ },
+ "name": "Cleaning up runtimes cache.list runtime disk images",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_END@raw_io.output_text@@@"
+ ]
+ },
+ {
"cmd": [],
"name": "install runtimes"
},