-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Migrated integration_flutter_test/embedder (scenic integration test) from fuchsia.git #26880
Conversation
New integration tests depend on third_party Dart libraries that don't include a BUILD.gn in their upstream repositories. Add `build/secondary` BUILD.gn files (which require `flutter/tools/fuchsia/dart/dart_library.gni` defined in flutter/engine#26880) so these dart libraries can be included in Dart-based fuchsia components.
d6f16cd
to
26c5657
Compare
fecf98e
to
d76802f
Compare
New integration tests depend on third_party Dart libraries that don't include a BUILD.gn in their upstream repositories. Add `build/secondary` BUILD.gn files (which require `flutter/tools/fuchsia/dart/dart_library.gni` defined in flutter/engine#26880) so these dart libraries can be included in Dart-based fuchsia components.
New integration tests depend on third_party Dart libraries that don't include a BUILD.gn in their upstream repositories. Add `build/secondary` BUILD.gn files (which require `flutter/tools/fuchsia/dart/dart_library.gni` defined in flutter/engine#26880) so these dart libraries can be included in Dart-based fuchsia components.
New integration tests depend on third_party Dart libraries that don't include a BUILD.gn in their upstream repositories. Add `build/secondary` BUILD.gn files (which require `flutter/tools/fuchsia/dart/dart_library.gni` defined in flutter/engine#26880) so these dart libraries can be included in Dart-based fuchsia components.
New integration tests depend on third_party Dart libraries that don't include a BUILD.gn in their upstream repositories. Add `build/secondary` BUILD.gn files (which require `flutter/tools/fuchsia/dart/dart_library.gni` defined in flutter/engine#26880) so these dart libraries can be included in Dart-based fuchsia components.
New integration tests depend on third_party Dart libraries that don't include a BUILD.gn in their upstream repositories. Add `build/secondary` BUILD.gn files (which require `flutter/tools/fuchsia/dart/dart_library.gni` defined in flutter/engine#26880) so these dart libraries can be included in Dart-based fuchsia components.
New integration tests depend on third_party Dart libraries that don't include a BUILD.gn in their upstream repositories. Add `build/secondary` BUILD.gn files (which require `flutter/tools/fuchsia/dart/dart_library.gni` defined in flutter/engine#26880) so these dart libraries can be included in Dart-based fuchsia components.
Ninja runs `action` scripts using the default python interpretter, and most flutter build scripts that use python currently require python2. In order to support python3 scripts as well, the `python3_action` invokes a wrapper python2-based script via GN `action` target, and the wrapper invokes the python3 interpretter with the given script. This new target is required to support flutter#26880, but is broken out to a separate PR (by request) to support other more immediate use cases.
Ninja runs `action` scripts using the default python interpretter, and most flutter build scripts that use python currently require python2. In order to support python3 scripts as well, the `python3_action` invokes a wrapper python2-based script via GN `action` target, and the wrapper invokes the python3 interpretter with the given script. This new target is required to support flutter#26880, but is broken out to a separate PR (by request) to support other more immediate use cases.
498bd52
to
7fe5d47
Compare
New integration tests depend on third_party Dart libraries that don't include a BUILD.gn in their upstream repositories. Add `build/secondary` BUILD.gn files (which require `flutter/tools/fuchsia/dart/dart_library.gni` defined in flutter/engine#26880) so these dart libraries can be included in Dart-based fuchsia components.
Ninja runs `action` scripts using the default python interpretter, and most flutter build scripts that use python currently require python2. In order to support python3 scripts as well, the `python3_action` invokes a wrapper python2-based script via GN `action` target, and the wrapper invokes the python3 interpretter with the given script. This new target is required to support flutter#26880, but is broken out to a separate PR (by request) to support other more immediate use cases..
Ninja runs `action` scripts using the default python interpretter, and most flutter build scripts that use python currently require python2. In order to support python3 scripts as well, the `python3_action` invokes a wrapper python2-based script via GN `action` target, and the wrapper invokes the python3 interpretter with the given script. This new target is required to support flutter#26880, but is broken out to a separate PR (by request) to support other more immediate use cases.
Please do not land this pull request. It contains files from the Fuchsia repository that are not support for use outside the Fuchsia repository. |
Agreed. Thanks Adam. This Draft is not intended to be landed as-is. |
Ninja runs `action` scripts using the default python interpretter, and most flutter build scripts that use python currently require python2. In order to support python3 scripts as well, the `python3_action` invokes a wrapper python2-based script via GN `action` target, and the wrapper invokes the python3 interpretter with the given script. This new target is required to support flutter#26880, but is broken out to a separate PR (by request) to support other more immediate use cases.
Ninja runs `action` scripts using the default python interpretter, and most flutter build scripts that use python currently require python2. In order to support python3 scripts as well, the `python3_action` invokes a wrapper python2-based script via GN `action` target, and the wrapper invokes the python3 interpretter with the given script. This new target is required to support flutter#26880, but is broken out to a separate PR (by request) to support other more immediate use cases.
Ninja runs `action` scripts using the default python interpretter, and most flutter build scripts that use python currently require python2. In order to support python3 scripts as well, the `python3_action` invokes a wrapper python2-based script via GN `action` target, and the wrapper invokes the python3 interpretter with the given script. This new target is required to support #26880, but is broken out to a separate PR (by request) to support other more immediate use cases.
eb479dc
to
101b978
Compare
shell/platform/fuchsia/flutter/integration_flutter_tests/embedder/BUILD.gn
Outdated
Show resolved
Hide resolved
101b978
to
eabd4d4
Compare
shell/platform/fuchsia/flutter/integration_flutter_tests/embedder/child-view/child_view.dart
Outdated
Show resolved
Hide resolved
This is a work in progress, with changes that successfully compile the embedder test. This commit leverages new build rules, added in PR flutter#27996, that enable building flutter tests as Fuchsia components, and dependencies on Dart libraries from the Fuchsia SDK (Fuchsia Dart APIs and Dart FIDL bindings). Notable: * Adds dart third_party library "quiver" version 2.1.5 to support a dependency from a Fuchsia Dart library required by the integration test. * Leverages the recent addition of TestWithEnvironment to the Fuchsia SDK, and blends this class with Googletest's (gtest) `testing::Test`, from Flutter's pre-existing gtest (third_party dependency).
WORK IN PROGRESS: Fuchsia does not yet find parent_view.cmx. I realized I need to package them, and flutter does not have build rules to build dart packages (AFAICT). The Fuchsia GN SDK (which we can't use because it lacks the Dart Fuchsia APIs) has a few other `build/` scripts that may be useful. I pulled some in, slightly tweaked them (still too many assumptions we are only building C++ packages!), and tried to rebuild. Build "appeared" successful, but re-running did not resolve the issue yet. Still working on this.
After dealing with lots of hidden issues and details, Dart packages finally appear to load.
So the test has the ability to run using a runner built from the same flutter/engine repo/state.
This also adds the fallback `fuchsia.com -> devhost` rule to `serve.sh`, which appears to be required in order to avoid running the default fuchsia package server as well.
with shell/platform/fuchsia/dart:<targets> This simplifies fuchsia SDK Dart library dependencies by assuming those targets match the versions required by Fuchsia. Since the GN target is a "fuchsia"-specific target, this is a reasonable constraint.
Replicates all five test cases, which pass.
This change requires first landing: https://flutter-review.googlesource.com/c/recipes/+/18540 which adds support for publishing more than one package per test. The CI test framework does not, currently, support running `serve.sh` as a secondary package server, so all package domains have been changed to assume `fuchsia.com`.
and trying to kill scenic.cmx before running the test
eabd4d4
to
fe2c72c
Compare
In case testing with a version of fuchsia built with the original fuchsia.git version of the tests, the flutter version will have the suffix "2", so there is no conflict or confusion.
fe2c72c
to
7a9face
Compare
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
…n test) from fuchsia.git (flutter/engine#26880)
…n test) from fuchsia.git (flutter/engine#26880)
The tests use upgraded flutter/repo build rules, implemented in previously merged PRs, starting with #27996, to compile C++ and Dart tests as Fuchsia components, with dependencies on both C++ and Dart FIDL bindings, and on additional Dart APIs included in the Fuchsia SDK.
The tests are rewritten, from using Flutter APIs in fuchsia.git, to using only
dart_ui
(sinceflutter/engine
tests cannot depend on the downstreamflutter/flutter
APIs), but the basic test program shells have been compiled and successfully run after publishing the test component to a running Fuchsia instance. (See//flutter/shell/platform/fuchsia/flutter/integration_flutter_tests/embedder/README.md
.)Now that the rewritten tests are complete and operational, future integration issues between Flutter and Fuchsia (e.g., Scenic) can be caught directly from
flutter/engine
builds, instead of being caught only from Fuchsia builds, which typically uses a version of Flutter that is at least 2 days old.Note this PR also migrates
dart_library
dependencies fromflutter/buildroot
(secondary/third_party/... packages) to a central flutter fuchsiaBUILD.gn
file, so thesecondary
BUILD.gn
files that originally defined thosedart_library
targets can now be removed.List which issues are fixed by this PR. You must list at least one issue.
Fixes: flutter/flutter#90286
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
writing and running engine tests.
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.