-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Made android_gradle_print_build_variants_test.dart more robust
#172910
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
Conversation
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.
Code Review
This pull request enhances the robustness of an Android Gradle test by verifying the presence of build variants without being sensitive to their order or other output. A suggestion has been made to use the containsAll matcher for improved conciseness and readability, aligning with the project's style guide emphasis on readability.
| expect(actualLines, contains('BuildVariant: debug'), reason: 'actual: $actualLines'); | ||
| expect(actualLines, contains('BuildVariant: release'), reason: 'actual: $actualLines'); | ||
| expect(actualLines, contains('BuildVariant: profile'), reason: 'actual: $actualLines'); |
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.
Consider using the containsAll matcher for a more concise and readable way to verify the presence of all expected build variants.1
This approach groups the related expectations into a single statement, enhancing readability. The failure message from containsAll is also descriptive, clearly indicating which elements are missing from the output.
expect(actualLines, containsAll(<String>[
'BuildVariant: debug',
'BuildVariant: release',
'BuildVariant: profile',
]));
Style Guide References
Footnotes
|
autosubmit label was removed for flutter/flutter/172910, because - The status or check suite Linux analyzer_benchmark has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
autosubmit label was removed for flutter/flutter/172910, because - The status or check suite Linux gradle_plugin_light_apk_test has failed. Please fix the issues identified (or deflake) before re-applying this label. |
chunhtai
left a comment
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.
LGTM
|
landing on red to help the tree get green |
flutter/flutter@46b097a...c3279ca 2025-07-30 [email protected] Roll Skia from 00765f238077 to da5a6704f8a3 (1 revision) (flutter/flutter#172966) 2025-07-30 [email protected] Roll Skia from 62476cd444d2 to 00765f238077 (3 revisions) (flutter/flutter#172955) 2025-07-30 [email protected] Roll Skia from 34693354289f to 62476cd444d2 (1 revision) (flutter/flutter#172950) 2025-07-30 [email protected] Roll Skia from f72bd01a49b1 to 34693354289f (1 revision) (flutter/flutter#172946) 2025-07-30 [email protected] [a11y] add RangeSlider to a11y test app as additional use-case (flutter/flutter#172922) 2025-07-30 [email protected] Roll Skia from a42898e5d622 to f72bd01a49b1 (21 revisions) (flutter/flutter#172944) 2025-07-29 [email protected] Fix SegmentedButton border doesn't reflect states (flutter/flutter#172754) 2025-07-29 [email protected] Fix documentation for FlutterEngineRunTask (flutter/flutter#172889) 2025-07-29 [email protected] Roll Fuchsia Linux SDK from tK_PAaLeo0pUxi8hv... to bQVQlLssTxxLjoDU0... (flutter/flutter#172925) 2025-07-29 [email protected] fix(scrollbar): Update padding type to EdgeInsetsGeometry (flutter/flutter#172056) 2025-07-29 [email protected] Refactor Android platform view code in advance of enabling HCPP on existing PV widgets (behind a flag) (flutter/flutter#170553) 2025-07-29 [email protected] Roll Packages from 6b2e34e to ed235d1 (4 revisions) (flutter/flutter#172905) 2025-07-29 [email protected] Add package PR triage note (flutter/flutter#172898) 2025-07-29 [email protected] Roll Skia from 409e1c7ba09b to a42898e5d622 (29 revisions) (flutter/flutter#172906) 2025-07-29 [email protected] Made `android_gradle_print_build_variants_test.dart` more robust (flutter/flutter#172910) 2025-07-29 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland licenses cpp switch (#172671)" (flutter/flutter#172912) 2025-07-29 [email protected] Fix Gemini Code Assist for GitHub config yaml (flutter/flutter#172887) 2025-07-29 [email protected] Marks Linux_android_emu_unstable android_defines_test to be unflaky (flutter/flutter#171856) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#9699) flutter/flutter@46b097a...c3279ca 2025-07-30 [email protected] Roll Skia from 00765f238077 to da5a6704f8a3 (1 revision) (flutter/flutter#172966) 2025-07-30 [email protected] Roll Skia from 62476cd444d2 to 00765f238077 (3 revisions) (flutter/flutter#172955) 2025-07-30 [email protected] Roll Skia from 34693354289f to 62476cd444d2 (1 revision) (flutter/flutter#172950) 2025-07-30 [email protected] Roll Skia from f72bd01a49b1 to 34693354289f (1 revision) (flutter/flutter#172946) 2025-07-30 [email protected] [a11y] add RangeSlider to a11y test app as additional use-case (flutter/flutter#172922) 2025-07-30 [email protected] Roll Skia from a42898e5d622 to f72bd01a49b1 (21 revisions) (flutter/flutter#172944) 2025-07-29 [email protected] Fix SegmentedButton border doesn't reflect states (flutter/flutter#172754) 2025-07-29 [email protected] Fix documentation for FlutterEngineRunTask (flutter/flutter#172889) 2025-07-29 [email protected] Roll Fuchsia Linux SDK from tK_PAaLeo0pUxi8hv... to bQVQlLssTxxLjoDU0... (flutter/flutter#172925) 2025-07-29 [email protected] fix(scrollbar): Update padding type to EdgeInsetsGeometry (flutter/flutter#172056) 2025-07-29 [email protected] Refactor Android platform view code in advance of enabling HCPP on existing PV widgets (behind a flag) (flutter/flutter#170553) 2025-07-29 [email protected] Roll Packages from 6b2e34e to ed235d1 (4 revisions) (flutter/flutter#172905) 2025-07-29 [email protected] Add package PR triage note (flutter/flutter#172898) 2025-07-29 [email protected] Roll Skia from 409e1c7ba09b to a42898e5d622 (29 revisions) (flutter/flutter#172906) 2025-07-29 [email protected] Made `android_gradle_print_build_variants_test.dart` more robust (flutter/flutter#172910) 2025-07-29 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland licenses cpp switch (#172671)" (flutter/flutter#172912) 2025-07-29 [email protected] Fix Gemini Code Assist for GitHub config yaml (flutter/flutter#172887) 2025-07-29 [email protected] Marks Linux_android_emu_unstable android_defines_test to be unflaky (flutter/flutter#171856) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…tter#172910) issue: flutter#172908 It's uncertain if this will fix the issue since we don't know why the old matcher failed. This may fix it, or it may just give us more information to debug with. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
…tter#172910) issue: flutter#172908 It's uncertain if this will fix the issue since we don't know why the old matcher failed. This may fix it, or it may just give us more information to debug with. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
…tter#172910) issue: flutter#172908 It's uncertain if this will fix the issue since we don't know why the old matcher failed. This may fix it, or it may just give us more information to debug with. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
…tter#172910) issue: flutter#172908 It's uncertain if this will fix the issue since we don't know why the old matcher failed. This may fix it, or it may just give us more information to debug with. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
issue: #172908
It's uncertain if this will fix the issue since we don't know why the old matcher failed. This may fix it, or it may just give us more information to debug with.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.