| # 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_test.gni") |
| |
| rustc_test("legacy_component_lib_tests_bin") { |
| edition = "2021" |
| output_name = "legacy_component_lib_tests" |
| testonly = true |
| source_root = "legacy_component_lib_tests.rs" |
| deps = [ |
| "//examples/components/routing/fidl:echo_rust", |
| "//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner_rust", |
| "//sdk/fidl/fuchsia.data:fuchsia.data_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/storage/vfs/rust:vfs", |
| "//src/sys/lib/legacy_component:legacy_component_lib", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "legacy_component_lib_tests.rs" ] |
| } |
| |
| fuchsia_component("echo_legacy_server") { |
| testonly = true |
| component_name = "echo_server" |
| manifest = "meta/echo_server.cmx" |
| deps = |
| [ "//src/sys/component_manager/testing/echo_server:echo_server_testing" ] |
| } |
| |
| fuchsia_test_component("legacy_component_lib_tests_cmp") { |
| component_name = "legacy_component_lib_tests" |
| manifest = "meta/legacy_component_lib_tests.cml" |
| deps = [ ":legacy_component_lib_tests_bin" ] |
| } |
| |
| fuchsia_test_package("legacy_component_lib_tests") { |
| test_components = [ ":legacy_component_lib_tests_cmp" ] |
| deps = [ ":echo_legacy_server" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":legacy_component_lib_tests" ] |
| } |
| |
| group("legacy_tests") { |
| testonly = true |
| deps = [ ":legacy_component_lib_tests" ] |
| } |