blob: f5e1de75adf67835a651abbb9f653f7a44ed43e8 [file] [log] [blame] [edit]
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(https://fxbug.dev/42173552): This shard defines a realm for tests in chromium. Once we are able
// to define these out of tree this definition should be moved to chromium.
{
collections: [
{
name: "chromium-tests",
environment: "#test-env",
durability: "transient",
},
],
offer: [
{
// Hermetic protocols offered to all tests. See
// https://fuchsia.dev/fuchsia-src/development/testing/components/test_runner_framework#hermetic_capabilities_for_tests.
protocol: [ "fuchsia.process.Launcher" ],
from: "parent",
to: [ "#chromium-tests" ],
},
{
dictionary: "diagnostics",
from: "parent",
to: "#chromium-tests",
},
// TODO(https://fxbug.dev/345827642): Remove once out-of-tree users are using these
// protocols from the dictionary.
{
protocol: [
"fuchsia.inspect.InspectSink",
"fuchsia.logger.LogSink",
],
from: "parent/diagnostics",
to: "#chromium-tests",
},
// These system capabilities are offered for use by the chromium tests.
// TODO(https://fxbug.dev/42173552): Drive down this list via fakes and similar.
{
protocol: [
// "fuchsia.buildinfo.Provider" is faked.
"fuchsia.device.NameProvider",
"fuchsia.feedback.ComponentDataRegister",
"fuchsia.feedback.CrashReportingProductRegister",
"fuchsia.fonts.Provider",
"fuchsia.hwinfo.Board",
"fuchsia.hwinfo.Device",
"fuchsia.hwinfo.Product",
// "fuchsia.intl.PropertyProvider" is faked.
"fuchsia.kernel.VmexResource",
"fuchsia.media.Audio",
"fuchsia.media.AudioDeviceEnumerator",
"fuchsia.media.ProfileProvider",
"fuchsia.mediacodec.CodecFactory",
"fuchsia.memorypressure.Provider",
"fuchsia.net.http.Loader",
"fuchsia.net.interfaces.State",
"fuchsia.net.name.Lookup",
"fuchsia.posix.socket.Provider",
"fuchsia.scheduler.RoleManager",
"fuchsia.settings.Display",
// Tests of the media system change their behavior based on
// board.
// TODO(https://fxbug.dev/42164198): Remove when specialized test realms
// are ready.
"fuchsia.sysinfo.SysInfo",
"fuchsia.sysmem.Allocator",
"fuchsia.sysmem2.Allocator",
"fuchsia.vulkan.loader.Loader",
"fuchsia.web.ContextProvider",
],
from: "parent",
to: "#chromium-tests",
},
{
protocol: [
"fuchsia.tracing.perfetto.ProducerConnector",
"fuchsia.tracing.provider.Registry",
],
from: "parent",
to: "#chromium-tests",
},
{
protocol: [
"fuchsia.element.GraphicalPresenter",
"fuchsia.media.drm.Widevine",
],
from: "parent",
to: "#chromium-tests",
availability: "optional",
},
// These protocols are optional because they may not exist on all products that
// include test_manager. They are routed with `same_as_target` because they
// are required by Chromium tests. The tests run only on products where the
// protocols are available.
{
protocol: [
"fuchsia.accessibility.semantics.SemanticsManager",
"fuchsia.input.virtualkeyboard.ControllerCreator",
"fuchsia.media.SessionAudioConsumerFactory",
"fuchsia.stash.SecureStore",
"fuchsia.ui.composition.Allocator",
"fuchsia.ui.composition.Flatland",
"fuchsia.ui.input3.Keyboard",
],
from: "parent",
to: "#chromium-tests",
availability: "same_as_target",
},
// Test realms may offer subdirectories of config-data to test
// components. See:
// https://fuchsia.dev/fuchsia-src/development/components/data#product-specific_configuration_with_config_data
{
directory: "config-data",
from: "parent",
to: "#chromium-tests",
},
{
event_stream: [
"capability_requested",
"debug_started",
"destroyed",
"started",
"stopped",
],
from: "parent",
to: "#chromium-tests",
scope: "#chromium-tests",
},
{
// TODO(https://fxbug.dev/324273348): Remove this capability once the clients have
// been migrated to services. The service capability has been added below.
directory: [
"dev-goldfish-address-space",
"dev-goldfish-control",
"dev-goldfish-pipe",
"dev-goldfish-sync",
"dev-gpu",
// Tests of the media system want to test against the real hardware.
//
// TODO(https://fxbug.dev/42164198): Remove when specialized test realms are ready.
"dev-mediacodec",
],
from: "parent",
to: "#chromium-tests",
rights: [ "r*" ],
},
{
// These services replace the directory capabilities above.
service: [
"fuchsia.gpu.magma.Service",
"fuchsia.hardware.goldfish.AddressSpaceService",
"fuchsia.hardware.goldfish.ControllerService",
"fuchsia.hardware.goldfish.ControlService",
"fuchsia.hardware.goldfish.SyncService",
"fuchsia.hardware.mediacodec.Service",
],
from: "parent",
to: "#chromium-tests",
},
{
directory: "root-ssl-certificates",
from: "parent",
to: "#chromium-tests",
},
{
directory: [
// `tzdata-icu` offers /config/tzdata/icu.
// `tzdata-icu-44-le` offers /config/tzdata/icu/44/le only.
"tzdata-icu",
"tzdata-icu-44-le",
],
from: "parent",
to: "#chromium-tests",
},
{
storage: "fxfs_tests_data",
from: "self",
as: "data",
to: [ "#chromium-tests" ],
},
{
storage: "tmp",
from: "self",
to: [ "#chromium-tests" ],
},
{
storage: "cache",
from: "self",
to: [ "#chromium-tests" ],
},
],
}