Repository navigation
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-team-archive/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-team-archive/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-team-archive/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-team-archive/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-team-archive/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-team-archive/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-team-archive/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-team-archive#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-team-archive#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-team-archive/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-team-archive#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-team-archive#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-team-archive#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-team-archive#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.
|
The most recent commit will not pass until the FEMU test script is updated by this CL: Once published, if everything works as planned, CI should include, and hopefully pass, the new integration test. |
|
except, ugh, more licenses changes to merge. I'll wait until the infra CL merges. |
eb479dc to
101b978
Compare
101b978 to
eabd4d4
Compare
This is a work in progress, with changes that successfully compile the embedder test. This commit leverages new build rules, added in PR flutter-team-archive#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. |
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/enginetests cannot depend on the downstreamflutter/flutterAPIs), 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/enginebuilds, 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_librarydependencies fromflutter/buildroot(secondary/third_party/... packages) to a central flutter fuchsiaBUILD.gnfile, so thesecondaryBUILD.gnfiles that originally defined thosedart_librarytargets 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.