This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Upgrades to felt (running on multiple modes, multiple backends, single test target option) #22260
Merged
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
40848e0
testing running the tests on all build modes
f2213f3
don't run debug mode on other browsers
75465a3
fix platform message test failures
eae835f
some cleanup. change dispose platform channel message
5889d0c
adding flags to control the integration tests better with felt
8117c92
running tests by target name, selecting web rendering backend
3d7e145
fix conditions
0f13714
carrying some conditions to helper methods. Adding comments
dfb5353
create a blocked list for failing canvaskit test
78fad8e
parse parameters before all integration tests
9b5f830
Give better warning to developers for tests that are blocked for CI
2598808
address some reviwer comments (more remains)
1812790
remove named parameters
73fab26
also run with auto mode
c997661
add verbose option
f373ba6
reduce the number of tests running. skip url_test for now
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
address some reviwer comments (more remains)
- Loading branch information
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -359,10 +359,10 @@ class IntegrationTestsManager { | |
| !IntegrationTestsArgumentParser.instance.buildMode.isEmpty; | ||
|
|
||
| bool get _renderingBackendSelected => | ||
| !IntegrationTestsArgumentParser.instance.renderingBackend.isEmpty; | ||
| !IntegrationTestsArgumentParser.instance.webRenderer.isEmpty; | ||
|
|
||
| bool get _renderingBackendHtml => | ||
| IntegrationTestsArgumentParser.instance.renderingBackend == 'html'; | ||
| IntegrationTestsArgumentParser.instance.webRenderer == 'html'; | ||
|
|
||
| bool get _runAllTestTargets => | ||
| IntegrationTestsArgumentParser.instance.testTarget.isEmpty; | ||
|
|
@@ -541,7 +541,7 @@ class IntegrationTestsArgumentParser { | |
| /// Whether to use html or canvaskit backend. | ||
| /// | ||
| /// If not set html rendering backend will be used. | ||
| String renderingBackend; | ||
| String webRenderer; | ||
|
|
||
| void populateOptions(ArgParser argParser) { | ||
| argParser | ||
|
|
@@ -566,29 +566,31 @@ class IntegrationTestsArgumentParser { | |
| 'tests will only be run using that mode. ' | ||
| 'See https://flutter.dev/docs/testing/build-modes for more ' | ||
| 'details on the build modes.') | ||
| ..addOption('rendering-backend', | ||
| ..addOption('web-renderer', | ||
| defaultsTo: '', | ||
| help: 'By default both `html` and `canvaskit` rendering backends are ' | ||
| ' tested when running integration tests. If this option is set ' | ||
| ' only one of these backends will be used. `canvaskit` and `html`' | ||
| ' are the only available options. '); | ||
| help: 'By default all three options (`html`, `canvaskit`, `auto`) ' | ||
| ' for rendering backends are tested when running integration ' | ||
| ' tests. If this option is set only the backend provided by this ' | ||
| ' option will be used. `auto`, `canvaskit` and `html`' | ||
| ' are the available options. '); | ||
| } | ||
|
|
||
| /// Populate browser with results of the arguments passed. | ||
| void parseOptions(ArgResults argResults) { | ||
| testTarget = argResults['target'] as String; | ||
| buildMode = argResults['build-mode'] as String; | ||
| if (!buildMode.isEmpty && | ||
| buildMode.toLowerCase() != 'debug' && | ||
| buildMode.toLowerCase() != 'profile' && | ||
| buildMode.toLowerCase() != 'release') { | ||
| buildMode != 'debug' && | ||
| buildMode != 'profile' && | ||
| buildMode != 'release') { | ||
| throw ArgumentError('Unexpected build mode: $buildMode'); | ||
| } | ||
| renderingBackend = argResults['rendering-backend'] as String; | ||
| if (!renderingBackend.isEmpty && | ||
| renderingBackend.toLowerCase() != 'html' && | ||
| renderingBackend.toLowerCase() != 'canvaskit') { | ||
| throw ArgumentError('Unexpected rendering backend: $renderingBackend'); | ||
| webRenderer = argResults['web-renderer'] as String; | ||
| if (!webRenderer.isEmpty && | ||
| webRenderer != 'html' && | ||
| webRenderer != 'canvaskit' && | ||
| webRenderer != 'auto') { | ||
| throw ArgumentError('Unexpected rendering backend: $webRenderer'); | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -638,7 +640,7 @@ const Map<String, List<String>> blockedTestsListsMap = <String, List<String>>{ | |
|
|
||
| /// Tests blocked for one of the build modes. | ||
| /// | ||
| /// If a test is not suppose to run for one of the modes also add that test | ||
| /// If a test is not supposed to run for one of the modes also add that test | ||
| /// to the corresponding list. | ||
| // TODO(nurhan): Remove the failing test after fixing. | ||
| const Map<String, List<String>> blockedTestsListsMapForModes = | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's still weird that one needs to recompile
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since it's been a while we added blocked tests logic, it seems like the request is outside of this PR. I create another issue and address that change there. |
||
|
|
||
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.
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 is more common to call such tests "skipped" rather than "blocked".
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 is outside of the scope of this work. It has been a while since we added 'blocked' test concept. Blocked word is introduced as a replacement to 'blacklist' a while ago.