blob: acc1c905174df03d754f866a7d1b6830b562c18d [file] [log] [blame] [edit]
# Copyright 2020 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.
import("//build/bazel/export_fuchsia_package_to_bazel.gni")
import("//build/components.gni")
import("//build/test.gni")
import("//tools/cmc/build/expect_includes.gni")
executable("bin") {
testonly = true
output_name = "fake-display-stack-host"
sources = [ "main.cc" ]
deps = [
":config-cpp-lib",
"//sdk/fidl/fuchsia.hardware.display:fuchsia.hardware.display_cpp",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/component/outgoing/cpp",
"//sdk/lib/driver/testing/cpp:scoped_global_logger",
"//sdk/lib/sys/cpp",
"//src/graphics/display/lib/fake-display-stack",
"//src/graphics/display/lib/fake-display-stack:sysmem-service-forwarder",
]
}
fuchsia_component_manifest("component-manifest") {
testonly = true
manifest = "meta/fake-display-stack-host.cml"
component_name = "fake-display-stack-host"
}
fuchsia_component("component") {
testonly = true
cm_label = ":component-manifest"
deps = [ ":bin" ]
}
fuchsia_structured_config_cpp_elf_lib("config-cpp-lib") {
testonly = true
namespace = "fake_display_stack_host_config"
cm_label = ":component-manifest"
}
fuchsia_structured_config_values("default-config-values") {
testonly = true
cm_label = ":component-manifest"
values_source = "config/default-config-values.json5"
}
group("component-with-default-config") {
testonly = true
deps = [
":component",
":default-config-values",
]
}
fuchsia_package("fake-display-stack-host") {
testonly = true
package_name = "fake-display-stack-host"
deps = [
":component",
":default-config-values",
]
}
export_fuchsia_package_to_bazel("fake-display-stack-host.bazel_input") {
testonly = true
package = ":fake-display-stack-host"
}
expect_includes("shard-includes") {
includes = [ "meta/fake-display-stack-host.shard.cml" ]
}
# Includes `component` as a child component
# and performs "includes" check for the fake display coordinator provider
# shard in the component manifest.
#
# Only supports statically defined components; do not use this on realms built
# by Realm Builder.
group("child-component") {
testonly = true
deps = [
":component",
":shard-includes",
]
}
# Similar to `child-component` but also contains the default config.
# Only supports statically defined components; do not use this on realms built
# by Realm Builder.
group("child-component-with-default-config") {
testonly = true
deps = [
":component-with-default-config",
":shard-includes",
]
}
group("tests") {
testonly = true
deps = [ "tests" ]
}