Skip to content
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

Merged
merged 13 commits into from Apr 4, 2023

Conversation

eyebrowsoffire
Copy link
Contributor

We need to throw if the run_suite_step encounters any test failures.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Mar 31, 2023
@eyebrowsoffire eyebrowsoffire marked this pull request as ready for review March 31, 2023 22:06
@@ -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}.');
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@eyebrowsoffire eyebrowsoffire added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 3, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 3, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Apr 3, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
2 participants