Repository navigation
[CI] Show better message when macOS tests can't run due to build failure - #25924
Conversation
When the 'Build macOS tests' job fails, the downstream macOS test jobs are skipped. Previously, this showed ':fire: Failed catastrophically' for each test, which was confusing. Now it shows a clear message explaining that the tests didn't run because the build job failed, with a link to the pipeline. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR updates the Azure DevOps test-results reporting module to show a clearer message for macOS tests that never ran because the βBuild macOS testsβ stage/job failed, instead of reporting a catastrophic test failure.
Changes:
- Add
BuildMacTestsStatustoParallelTestsResultsand populate it fromstageDependencies. - When a macOS test has no summary and the build-mac-tests job didnβt succeed, emit a warning explaining the tests didnβt run and link back to the pipeline.
| if ($result.Passed -eq -2 -or $result.Failed -eq -2) { | ||
| $stringBuilder.AppendLine(":fire: Failed catastrophically on $($r.Context) (no summary found).") | ||
| if ($r.IsMacTest -and -not [string]::IsNullOrEmpty($this.BuildMacTestsStatus) -and $this.BuildMacTestsStatus -ne "Succeeded") { | ||
| $pipelineLink = "$Env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI$Env:SYSTEM_TEAMPROJECT/_build/results?buildId=$Env:BUILD_BUILDID" | ||
| $stringBuilder.AppendLine(":warning: Tests did not run because the [Build macOS tests]($pipelineLink) job failed.") | ||
| } else { |
| # Extract the Build macOS tests status from stage dependencies | ||
| if ($stageDep.ContainsKey("build_macos_tests")) { | ||
| $buildMacStage = $stageDep["build_macos_tests"] | ||
| if ($buildMacStage.ContainsKey("build_macos_tests_job")) { | ||
| $buildMacJob = $buildMacStage["build_macos_tests_job"] |
This comment has been minimized.
This comment has been minimized.
β [PR Build #4593cde] Build passed (Detect API changes) βPipeline on Agent |
β [PR Build #4593cde] Build passed (Build packages) βPipeline on Agent |
β API diff for current PR / commitNET (empty diffs)β API diff vs stableNET (empty diffs)βΉοΈ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
β [PR Build #4593cde] Build passed (Build macOS tests) βPipeline on Agent |
π [CI Build #4593cde] Test results πTest resultsβ All tests passed on VSTS: test results. π All 199 tests passed π Tests countsβ
assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS testsβ
Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
When the 'Build macOS tests' job fails, the downstream macOS test jobs are skipped. Previously, this showed ' π₯ Failed catastrophically' for each test, which was confusing. Now it shows a clear message explaining that the tests didn't run because the build job failed, with a link to the pipeline.