Skip to content

Commit

Permalink
Improve retry handling for XHarness mono runtime tests (#67955)
Browse files Browse the repository at this point in the history
  • Loading branch information
premun authored Apr 14, 2022
1 parent d759829 commit 5385962
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public int UninstallMobileApp(string platform, string category, string testBinar

private static int HandleMobileApp(string action, string platform, string category, string testBinaryBase, string reportBase)
{
//install or uninstall mobile app
int exitCode = -100;

if (action == "install" && (File.Exists($"{testBinaryBase}/.retry") || File.Exists($"{testBinaryBase}/.reboot")))
if (File.Exists($"{testBinaryBase}/.retry"))
{
// We have requested a work item retry because of an infra issue - no point executing further tests
return exitCode;
}

Expand Down Expand Up @@ -128,11 +128,12 @@ private static int HandleMobileApp(string action, string platform, string catego
// 86 - PACKAGE_INSTALLATION_TIMEOUT
// 88 - SIMULATOR_FAILURE
// 89 - DEVICE_FAILURE
var retriableCodes = new[] { 78, 81, 85, 86, 88, 89 };
if (action == "install" && retriableCodes.Contains(exitCode))
// 90 - APP_LAUNCH_TIMEOUT
// 91 - ADB_FAILURE
var retriableCodes = new[] { 78, 81, 85, 86, 88, 89, 90, 91 };
if (retriableCodes.Contains(exitCode))
{
CreateRetryFile($"{testBinaryBase}/.retry", exitCode, category);
CreateRetryFile($"{testBinaryBase}/.reboot", exitCode, category);
return exitCode;
}

Expand Down

0 comments on commit 5385962

Please sign in to comment.