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

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Oct 13, 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.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 14, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 14, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 14, 2023

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.

@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2023
@dnfield
Copy link
Contributor Author

dnfield commented Oct 16, 2023

Not able to repro failure locally, try to rebase to see if it helps...

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 16, 2023

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.
@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2023
@auto-submit auto-submit bot merged commit b14d346 into flutter:main Oct 16, 2023
@dnfield dnfield deleted the gold branch October 16, 2023 21:55
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.
auto-submit bot pushed a commit that referenced this pull request Oct 17, 2023
This reverts commit b14d346.

With #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.
harryterkelsen pushed a commit that referenced this pull request Oct 23, 2023
This reverts commit b14d346.

With #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.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants