| # Copyright 2018 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/fidl/fidl.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| fidl("echos") { |
| name = "fuchsia.test.echos" |
| |
| sources = [ "echos.test.fidl" ] |
| } |
| |
| rustc_binary("fuchsia_component_test_outer_bin") { |
| name = "fuchsia_component_test_outer" |
| edition = "2021" |
| deps = [ |
| ":echos-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| source_root = "outer.rs" |
| |
| sources = [ "outer.rs" ] |
| } |
| |
| fuchsia_unittest_package("fuchsia_component_test_outer") { |
| manifest = "meta/fuchsia_component_test_outer.cmx" |
| deps = [ |
| ":fuchsia_component_test_middle", |
| ":fuchsia_component_test_middle_sibling", |
| ":fuchsia_component_test_outer_bin", |
| ] |
| } |
| |
| rustc_binary("fuchsia_component_test_middle_bin") { |
| name = "fuchsia_component_test_middle" |
| edition = "2021" |
| deps = [ |
| ":echos-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:thiserror", |
| ] |
| source_root = "middle.rs" |
| |
| sources = [ "middle.rs" ] |
| } |
| |
| fuchsia_package_with_single_component("fuchsia_component_test_middle") { |
| manifest = "meta/fuchsia_component_test_middle.cmx" |
| deps = [ |
| ":fuchsia_component_test_inner", |
| ":fuchsia_component_test_middle_bin", |
| ] |
| testonly = true |
| } |
| |
| rustc_binary("fuchsia_component_test_middle_sibling_bin") { |
| name = "fuchsia_component_test_middle_sibling" |
| edition = "2021" |
| deps = [ |
| ":echos-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| source_root = "middle_sibling.rs" |
| |
| sources = [ "middle_sibling.rs" ] |
| } |
| |
| fuchsia_package_with_single_component("fuchsia_component_test_middle_sibling") { |
| manifest = "meta/fuchsia_component_test_middle_sibling.cmx" |
| deps = [ ":fuchsia_component_test_middle_sibling_bin" ] |
| testonly = true |
| } |
| |
| rustc_binary("fuchsia_component_test_inner_bin") { |
| name = "fuchsia_component_test_inner" |
| edition = "2021" |
| deps = [ |
| ":echos-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:thiserror", |
| ] |
| source_root = "inner.rs" |
| |
| sources = [ "inner.rs" ] |
| } |
| |
| fuchsia_package_with_single_component("fuchsia_component_test_inner") { |
| manifest = "meta/fuchsia_component_test_inner.cmx" |
| deps = [ ":fuchsia_component_test_inner_bin" ] |
| testonly = true |
| } |