New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail the run_suite_step if any test failures are detected. #40834
Conversation
@@ -118,6 +118,7 @@ class RunSuiteStep implements PipelineStep { | |||
if (io.exitCode != 0) { | |||
print('[${suite.name.ansiCyan}] ${'Some tests failed.'.ansiRed}'); | |||
io.exitCode = 0; | |||
throw ToolExit('Some unit tests failed in suite ${suite.name.ansiCyan}.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the previous line? It would be good to have a comment explaining why. It's not obvious why exitCode is set to 0 just before throwing an error, which presumably will result in a non-zero exitCode again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's basically because we're calling "main" of the test runner, which modifies the exit code. We aggregate all the results and then at the end do our own logic on how to exit the program. I'll add a comment.
auto label is removed for flutter/engine, pr: 40834, due to - The status or check suite Linux linux_web_engine has failed. Please fix the issues identified (or deflake) before re-applying this label. |
We need to throw if the
run_suite_step
encounters any test failures.