| # Copyright 2019 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/component/config.gni") |
| import("//build/components.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| rustc_test("base_resolver_test_bin") { |
| name = "base_resolver_test" |
| edition = "2018" |
| source_root = "base_resolver_test.rs" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component-test", |
| "//src/sys/lib/component-events", |
| ] |
| |
| sources = [ "base_resolver_test.rs" ] |
| } |
| |
| component_config("cm_config_appmgr_loader") { |
| sources = [ "configs/cm_config_appmgr_loader.json5" ] |
| dest = "data/cm_config_appmgr_loader" |
| } |
| |
| fuchsia_component("cm_appmgr_loader") { |
| deps = [ |
| ":cm_config_appmgr_loader", |
| "//src/sys/component_manager:bin", |
| ] |
| manifest = "meta/cm_appmgr_loader.cml" |
| } |
| |
| component_config("cm_config_disabled_resolver") { |
| sources = [ "configs/cm_config_disabled_resolver.json5" ] |
| dest = "data/cm_config_disabled_resolver" |
| } |
| |
| fuchsia_component("cm_disabled_resolver") { |
| deps = [ |
| ":cm_config_disabled_resolver", |
| "//src/sys/component_manager:bin", |
| ] |
| manifest = "meta/cm_disabled_resolver.cml" |
| } |
| |
| rustc_binary("root_component_bin") { |
| name = "root_component" |
| edition = "2018" |
| source_root = "root_component.rs" |
| |
| deps = [ |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.component:fuchsia.component-rustc", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "root_component.rs" ] |
| } |
| |
| fuchsia_component("root") { |
| testonly = true |
| deps = [ ":root_component_bin" ] |
| manifest = "meta/root.cml" |
| } |
| |
| fuchsia_unittest_package("base_resolver_test") { |
| manifest = "meta/base_resolver_test.cml" |
| deps = [ |
| ":base_resolver_test_bin", |
| ":cm_appmgr_loader", |
| ":cm_disabled_resolver", |
| ":root", |
| "//src/sys/component_manager/testing/echo_server", |
| ] |
| } |