This PR also wraps up the soft transition for #27417.
Because some unit tests depend on the real Scenic which isn't hermetic, `flutter_runner_tests` and `flutter_runner_scenic_tests` aren't currently compatible with cfv2.
This will change once a FakeScenic is created (https://fxbug.dev/79873).
See https://fxbug.dev/79691.
This will allow us to include package, url, and argument information in the engine repo, requiring less infra soft transitions.
The schema of this file should be something like:
```yaml
test_suites:
- package: tests-0.far
- url: fuchsia-pkg://fuchsia.com/tests/meta#tests.cm
- test_args: -- --gtest_filter=-Test.Disabled
```
test_args is optional.
See https://fxbug.dev/79691.
In preparation for #25551, rename SessionConnection to
DefaultSessionConnection. The plan is to have SessionConnection be an
interface we can create a fake of for testing purposes.
Per https://fuchsia.dev/fuchsia-src/concepts/testing/v1_test_component,
in order to access non-basic system services like Vulkan loader and
sysmem allocator, we need to add "system-services" field to the cmx
metadata file.
Unittests like "shell_test" requires Vulkan to run properly, so we
add Vulkan loader and sysmem services; for Flutter runner tests,
we also need to add fuchsia.ui.scenic.Scenic since the test needs
to create a Scenic session as well.
TEST=shell_tests (SkpWarmupTest.Basic/SkpWarmupTest.Image)
flutter_runner_tests (EngineTest.SkpWarmUp) on FEMU
This is a Fuchsia-only shell test, confirming that when the timezone
setting is changed on the realm via Fuchsia's FIDL interface
`fuchsia.settings.Intl`, the Dart isolate running in that realm receives
the change and starts reporting the appropriate timestamp.
We already have a [similar test][tst] that verifies the timezones in the
dart VM matches the local timezone at start, but there was no test that
also verified timezone changes.
[tst]: https://github.com/flutter/engine/blob/master/shell/common/shell_unittests.cc#L1166
See issue #61284
[fuchsia] fix and re-enable SessionConnection unittests
This change waits until Scenic is initialized before beginning the test
logic. This should fix the issue where the test starts running before or
during Scenic startup.
* Re-enable logging.
fuchsia_ctl was updated to support processing the logs as a stream
instead of keeping them in the process.
Bug:
flutter/flutter#57273
* Add path to logs file.
* Add the isolated output env directly to the script.
* Save log to local directory and printing it using cat.
* Try collecting and printing logs as separate steps.
Tweak the primary flutter build rule so that fuchsia is more similar to
other platforms in how tests and the shell are built.
Only embedder_unittests and GLFW tests are disabled on Fuchsia now.
TEST: Ran unittests on host/fuchsia; workstation on fuchsia
BUG: fxb/53847, fxb/54056
Adds a test that verifies that the view of the local time is the same in
the Dart isolate and the process that is running the test.
Specifically, this test is useful to verify that the code paths for
timezone retrieval do not break while the underlying FIDL protocols are
being refactored.
However, since the check is generally useful, the test is written as a
general flutter test.
Running this on Fuchsia required adding `fuchsia.intl.ProfileProvider`
to the CMX file that is used for all build Fuchsia packages.
Testing is a bit involved on Fuchsia. You must build the Fuchsia
package `fluter/shell/common:shell_tests` and publish it to the dev
repository for your Fuchsia device. It seems that a way to do so is to
modify the script `flutter/tools/fuchsia/build_fuchsia_artifacts.py` and
modify its function `GetTargetsToBuild` like so:
```
def GetTargetsToBuild(product=False):
targets_to_build = [
'flutter/shell/platform/fuchsia:fuchsia',
'flutter/shell/common:shell_tests',
]
return targets_to_build
```
Next, the Fuchsia packages need to be compiled and published.
Once done, the following `fx` invocation will run the test, assuming
that you have your Fuchsia setup:
```
fx shell run \
fuchsia-pkg://fuchsia.com/shell_tests#meta/shell_tests.cmx \
-- --gtest_filter=ShellTest.LocaltimesMatch
```