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
Fix Platform.script for flutter_tester
#46911
Merged
Merged
Conversation
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
jonahwilliams
approved these changes
Oct 13, 2023
Contributor
jonahwilliams
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
zanderso
approved these changes
Oct 13, 2023
christopherfujino
approved these changes
Oct 13, 2023
Contributor
christopherfujino
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.
cool
Contributor
|
auto label is removed for flutter/engine/46911, due to - The status or check suite Linux Framework Smoke Tests has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Contributor
Author
|
Not able to repro failure locally, try to rebase to see if it helps... |
Contributor
|
auto label is removed for flutter/engine/46911, due to - The status or check suite Linux Framework Smoke Tests has failed. Please fix the issues identified (or deflake) before re-applying this label. |
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Oct 16, 2023
Avoid using string replacement on a bogus string to get the relative directory of this test. flutter/engine#46911 will fix the behavior of Platform.script so it actually has the file being executed, but that will not be the file the test author wrote, it will be `listener.dart.dill` generated by tool code and running in a temp directory for this particular test. We may want to come up with a more robust way of providing the test for framework test users, but we should do so in a way that will not limit the ability to run multiple tests in a single process if that offers performance benefits.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 16, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 16, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 16, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 17, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 17, 2023
jason-simmons
added a commit
to jason-simmons/flutter_engine
that referenced
this pull request
Oct 17, 2023
This reverts commit b14d346. With flutter#46911, the Platform.script API will return a URI for the compiled temporary wrapper script generated by "flutter test". This will cause issues for tests that expect Platform.script to reflect the directory where "flutter test" was launched.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 17, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 17, 2023
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Oct 17, 2023
…136695) flutter/engine@2d55e29...2159fdb 2023-10-17 [email protected] Roll Skia from 751358929d1f to 205b728a8623 (1 revision) (flutter/engine#46982) 2023-10-17 [email protected] Revert "Fix `Platform.script` for flutter_tester" (flutter/engine#46981) 2023-10-16 [email protected] Roll Dart SDK from 12f6559bd6ed to f3e1cd38e8b0 (1 revision) (flutter/engine#46977) 2023-10-16 [email protected] Roll Fuchsia Linux SDK from 6E-cSq679DjzBMcqY... to Y9mDBoH4BSC6pWFXV... (flutter/engine#46974) 2023-10-16 [email protected] Roll Skia from 8919fecf15c1 to 751358929d1f (4 revisions) (flutter/engine#46972) 2023-10-16 [email protected] [Impeller] GPUTracer for Metal. (flutter/engine#46846) 2023-10-16 [email protected] Fix `Platform.script` for flutter_tester (flutter/engine#46911) 2023-10-16 [email protected] Roll Skia from 85c8dca08cbe to 8919fecf15c1 (1 revision) (flutter/engine#46966) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from 6E-cSq679Djz to Y9mDBoH4BSC6 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: 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
harryterkelsen
pushed a commit
that referenced
this pull request
Oct 23, 2023
This addresses the problem in flutter/flutter#12847 which changed slightly over time. Today, `Platform.script` does not give an empty `file` URI, it gives something like `file://path/to/package/main.dart` _regardless of how the file is actually named_. After this change, it will give the absolute path to the file being run under test. So before this change, the new test would have a URI like ``` file:///Users/dnfield/src/flutter/engine/src/main.dart ``` And now it has ``` file:///Users/dnfield/src/flutter/engine/src/out/host_debug_unopt_arm64/gen/platform_test.dart.dill ``` This is going to be helpful in generating relative paths from the test file.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 addresses the problem in flutter/flutter#12847 which changed slightly over time.
Today,
Platform.scriptdoes not give an emptyfileURI, it gives something likefile://path/to/package/main.dartregardless of how the file is actually named.After this change, it will give the absolute path to the file being run under test.
So before this change, the new test would have a URI like
And now it has
This is going to be helpful in generating relative paths from the test file.