[flutter_tools] Add support for URI formats like ?line=x for "flutter test"#119740
Merged
DanTup merged 7 commits intoflutter:masterfrom Feb 27, 2023
Merged
[flutter_tools] Add support for URI formats like ?line=x for "flutter test"#119740DanTup merged 7 commits intoflutter:masterfrom
DanTup merged 7 commits intoflutter:masterfrom
Conversation
8f6cc86 to
32c77d3
Compare
| } | ||
| _testFiles = _findTests(testDir).toList(); | ||
| if (_testFiles.isEmpty) { | ||
| _testFileUris..clear()..addAll(_findTests(testDir).map(Uri.file)); |
Contributor
There was a problem hiding this comment.
why do we have to clear _testFileUris?
Contributor
Author
There was a problem hiding this comment.
We shouldn't. I guess I did this to preserve the original semantics (the original _testFiles was overwritten). Unless this verifyThenRunCommand method is being called multiple times on a single instance, it shouldn't make a difference.
(I've removed it now).
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 27, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 10, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 10, 2023
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This allows tests to be filtered by name/line/col using a URI format passed to
flutter test, asdart testnow does (dart-lang/test#1604).Mostly it's just changing some
Strings toURIs, which are then passed on topackage:test.The motivation here is to be able to run tests by the line they appear on from IDE UIs, because currently they have to use
--namewhich doesn't handle overlapping or dynamic names very well (or test names with characters that are complicated to escape when using shell-execute).Fixes #114968.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.