| # Copyright 2021 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/components.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":component-manager-services-tests" ] |
| } |
| |
| rustc_binary("service-routing-branch-bin") { |
| edition = "2021" |
| output_name = "service_routing_branch_bin" |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| source_root = "src/branch.rs" |
| sources = [ "src/branch.rs" ] |
| } |
| |
| fuchsia_test_component("service-routing-branch-onecoll") { |
| manifest = "meta/service-routing-branch-onecoll.cml" |
| deps = [ ":service-routing-branch-bin" ] |
| } |
| |
| fuchsia_test_component("service-routing-branch-twocoll") { |
| manifest = "meta/service-routing-branch-twocoll.cml" |
| deps = [ ":service-routing-branch-bin" ] |
| } |
| |
| rustc_test("service-routing-test-bin") { |
| edition = "2021" |
| deps = [ |
| "//examples/components/services/fidl:fuchsia.examples.services_rust", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//src/lib/fuchsia-fs", |
| "//src/sys/component_manager/tests/services/src/fidl:fuchsia.examples_rust", |
| "//src/sys/lib/component-events", |
| "//src/sys/lib/moniker", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:test-case", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| source_root = "src/service_routing_test.rs" |
| sources = [ "src/service_routing_test.rs" ] |
| } |
| |
| fuchsia_test_component("service-routing-test") { |
| manifest = "meta/service-routing-test.cml" |
| deps = [ ":service-routing-test-bin" ] |
| } |
| |
| rustc_test("filtered-service-routing-test-bin") { |
| edition = "2021" |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//src/sys/component_manager/tests/services/src/fidl:fuchsia.examples_rust", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| source_root = "src/filtered_service_routing_test.rs" |
| sources = [ "src/filtered_service_routing_test.rs" ] |
| } |
| |
| fuchsia_test_component("filtered-service-routing-test") { |
| manifest = "meta/filtered-service-routing-test.cml" |
| deps = [ ":filtered-service-routing-test-bin" ] |
| } |
| |
| rustc_binary("service-routing-client-bin") { |
| testonly = true |
| edition = "2021" |
| output_name = "service_routing_client_bin" |
| deps = [ |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/sys/component_manager/tests/services/src/fidl:fuchsia.examples_rust", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| source_root = "src/service_client.rs" |
| sources = [ "src/service_client.rs" ] |
| } |
| |
| fuchsia_test_component("echo-service-client") { |
| manifest = "meta/echo-service-client.cml" |
| deps = [ ":service-routing-client-bin" ] |
| } |
| |
| rustc_binary("multi_instance_echo_service_bin") { |
| testonly = true |
| edition = "2021" |
| output_name = "multi_instance_echo_service_bin" |
| deps = [ |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/sys/component_manager/tests/services/src/fidl:fuchsia.examples_rust", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| source_root = "src/multi_instance_echo_service.rs" |
| sources = [ "src/multi_instance_echo_service.rs" ] |
| } |
| |
| fuchsia_test_component("multi-instance-echo-provider") { |
| manifest = "meta/multi-instance-echo-provider.cml" |
| deps = [ ":multi_instance_echo_service_bin" ] |
| } |
| |
| fuchsia_test_package("component-manager-services-tests") { |
| test_components = [ |
| ":service-routing-test", |
| ":filtered-service-routing-test", |
| ] |
| |
| deps = [ |
| ":echo-service-client", |
| ":multi-instance-echo-provider", |
| ":service-routing-branch-onecoll", |
| ":service-routing-branch-twocoll", |
| "//src/sys/component_manager/testing/services_provider:provider-a-cmp", |
| "//src/sys/component_manager/testing/services_provider:provider-b-cmp", |
| ] |
| } |