Skip to content

Commit

Permalink
fuchsia: Allow access to system services in tests. (flutter#25303)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gnoliyil authored Mar 31, 2021
1 parent b8f5b94 commit 26f725d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
12 changes: 11 additions & 1 deletion shell/platform/fuchsia/flutter/meta/flutter_runner_tests.cmx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
"ICU_TIMEZONE_FILES_DIR=/pkg/data/tzdata"
]
},
"facets": {
"fuchsia.test": {
"system-services": [
"fuchsia.sysmem.Allocator",
"fuchsia.ui.scenic.Scenic",
"fuchsia.vulkan.loader.Loader"
]
}
},
"sandbox": {
"features": [
"deprecated-ambient-replace-as-executable",
Expand All @@ -18,7 +27,8 @@
"fuchsia.process.Launcher",
"fuchsia.vulkan.loader.Loader",
"fuchsia.logger.LogSink",
"fuchsia.sysmem.Allocator"
"fuchsia.sysmem.Allocator",
"fuchsia.ui.scenic.Scenic"
]
}
}
8 changes: 8 additions & 0 deletions testing/fuchsia/meta/fuchsia_test.cmx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"program": {
"binary": "bin/app"
},
"facets": {
"fuchsia.test": {
"system-services": [
"fuchsia.sysmem.Allocator",
"fuchsia.vulkan.loader.Loader"
]
}
},
"sandbox": {
"features": [
"vulkan",
Expand Down

0 comments on commit 26f725d

Please sign in to comment.