Fail inner build when running coreclr tests#124767
Merged
jtschuster merged 4 commits intodotnet:mainfrom Feb 24, 2026
Merged
Conversation
When a test run crashes, run.py would read stale testRun.xml files from a previous run, reporting old passing results instead of an error. Fix by: 1. Deleting old test result files before running tests. 2. Returning failure (exit code 1) when tests were run but no result files were produced, indicating the run likely crashed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/runtime-infrastructure |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical issue in CoreCLR test execution where test failures or crashes would incorrectly be reported as successes, causing run.py to read stale test results from previous runs. The fix changes the MSBuild Exec tasks from using IgnoreExitCode="true" to ContinueOnError="ErrorAndContinue", ensuring that while all tests continue to run in parallel, the build correctly fails if any test fails or crashes.
Changes:
- Modified test execution to fail the build on test failures while still allowing all tests to run to completion
- Removed redundant error message logging (MSBuild's built-in error reporting is more comprehensive)
- Improved code consistency with minor formatting adjustments
jkoritzinsky
approved these changes
Feb 24, 2026
iremyux
pushed a commit
to iremyux/dotnet-runtime
that referenced
this pull request
Mar 2, 2026
When a test run crashes, the msbuild build would still succeed, and run.py would read stale testRun.xml files from a previous run, reporting old (potentiall passing) results instead of an error. Instead use `ContinueOnError="ErrorAndContinue"` to allow subsequent test runs to continue but still fail the build. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a test run crashes, the msbuild build would still succeed, and run.py would read stale testRun.xml files from a previous run, reporting old (potentiall passing) results instead of an error. Instead use
ContinueOnError="ErrorAndContinue"to allow subsequent test runs to continue but still fail the build.