Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants