Skip to content

Commit

Permalink
Revert "Fail test run on all inconclusive tests"
Browse files Browse the repository at this point in the history
This reverts commit a6c97c3.
  • Loading branch information
jfversluis committed Oct 12, 2023
1 parent a6c97c3 commit a0a69f4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions eng/devices/android.cake
Expand Up @@ -365,11 +365,7 @@ Task("cg-uitest")
Information("Add Where filter to NUnit {0}", TEST_WHERE);
nunitSettings.Where = TEST_WHERE;
}
RunTestsNunit(testLibDllPath, nunitSettings);
// When all tests are inconclusive the run does not fail, check if this is the case and fail the pipeline so we get notified
FailRunOnOnlyInconclusiveTests(System.IO.Path.Combine(nunitSettings.Work.FullPath, "TestResult.xml"));
});

RunTarget(TARGET);
Expand Down
12 changes: 0 additions & 12 deletions eng/devices/devices-shared.cake
Expand Up @@ -8,15 +8,3 @@ if (string.Equals(TARGET, "uitest", StringComparison.OrdinalIgnoreCase))
DEFAULT_PROJECT = "../../src/Controls/tests/UITests/Controls.AppiumTests.csproj";
DEFAULT_APP_PROJECT = "../../src/Controls/samples/Controls.Sample.UITests/Controls.Sample.UITests.csproj";
}

void FailRunOnOnlyInconclusiveTests(string testResultsFile)
{
// When all tests are inconclusive the run does not fail, check if this is the case and fail the pipeline so we get notified
var totalTestCount = XmlPeek(testResultsFile, "/test-run/@total");
var inconclusiveTestCount = XmlPeek(testResultsFile, "/test-run/@inconclusive");

if (totalTestCount.Equals(inconclusiveTestCount))
{
throw new Exception("All tests are marked inconclusive, no tests ran. There is probably something wrong with running the tests.");
}
}
3 changes: 0 additions & 3 deletions eng/devices/ios.cake
Expand Up @@ -292,9 +292,6 @@ Task("cg-uitest")
nunitSettings.Where = TEST_WHERE;
}
RunTestsNunit(testLibDllPath, nunitSettings);
// When all tests are inconclusive the run does not fail, check if this is the case and fail the pipeline so we get notified
FailRunOnOnlyInconclusiveTests(System.IO.Path.Combine(nunitSettings.Work.FullPath, "TestResult.xml"));
});

RunTarget(TARGET);
Expand Down

0 comments on commit a0a69f4

Please sign in to comment.