Skip to content

Commit f1de706

Browse files
authored
Warn about broken exit code detection in iOS 15+ (#829)
1 parent bfd2a00 commit f1de706

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Microsoft.DotNet.XHarness.Apple/Orchestration/RunOrchestrator.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,18 @@ Task<ExitCode> ExecuteMacCatalystApp(AppBundleInformation appBundleInfo)
126126

127127
Task<ExitCode> ExecuteApp(AppBundleInformation appBundleInfo, IDevice device, IDevice? companionDevice)
128128
{
129+
// Exit code detection is broken on the newest iOS
130+
// More details here: https://github.com/dotnet/xharness/issues/819
131+
if (expectedExitCode != 0)
132+
{
133+
var os = target.Platform.IsSimulator() ? device.OSVersion.Split(' ', 2).Last() : device.OSVersion;
134+
if (Version.TryParse(os, out var version) && version.Major > 14)
135+
{
136+
_logger.LogWarning(
137+
"Exit code detection is not working on iOS/tvOS 15+ so the run will fail to match it with the expected value");
138+
}
139+
}
140+
129141
appRunStarted = true;
130142
return this.ExecuteApp(
131143
appBundleInfo,

0 commit comments

Comments
 (0)