From d04363678ad90c4e705aaf9dec4f2cf2e3b2e300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emek=20Vysok=C3=BD?= Date: Fri, 4 Feb 2022 11:43:45 +0100 Subject: [PATCH] Retry work items when Apple app exit code is not detected (#8428) --- .../Sdk/tools/xharness-runner/xharness-event-processor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-event-processor.py b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-event-processor.py index b326ca30658..afa900be7f0 100644 --- a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-event-processor.py +++ b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-event-processor.py @@ -179,6 +179,12 @@ def analyze_operation(command: str, platform: str, device: str, is_device: bool, elif platform == "apple": retry_message = 'This is typically not a failure of the work item. It will be run again. ' reboot_message = 'This machine will reboot to heal.' + + if exit_code == 82: # RETURN_CODE_NOT_SET + # See https://github.com/dotnet/xharness/issues/812 + print(f' Failed to detect app\'s exit code. {retry_message}') + retry = True + return if is_device: # If we fail to find a real device, it is unexpected as device queues should have one