| # 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/fidl/fidl.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| fidl("echos") { |
| name = "fuchsia.test.echos" |
| |
| sources = [ "echos.test.fidl" ] |
| } |
| |
| rustc_binary("fuchsia_component_test_outer_bin") { |
| name = "fuchsia_component_test_outer" |
| edition = "2018" |
| 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" |
| |
| # TODO(46724): Fix the leaks and remove this. |
| non_rust_deps = [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] |
| } |
| |
| test_package("fuchsia_component_test_outer") { |
| deps = [ ":fuchsia_component_test_outer_bin" ] |
| |
| tests = [ |
| { |
| name = "fuchsia_component_test_outer" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| rustc_binary("fuchsia_component_test_middle_bin") { |
| name = "fuchsia_component_test_middle" |
| edition = "2018" |
| deps = [ |
| ":echos-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//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" |
| |
| # TODO(46724): Fix the leaks and remove this. |
| non_rust_deps = [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] |
| } |
| |
| package("fuchsia_component_test_middle") { |
| deps = [ ":fuchsia_component_test_middle_bin" ] |
| |
| binary = "fuchsia_component_test_middle" |
| |
| meta = [ |
| { |
| path = rebase_path("meta/fuchsia_component_test_middle.cmx") |
| dest = "fuchsia_component_test_middle.cmx" |
| }, |
| ] |
| } |
| |
| rustc_binary("fuchsia_component_test_middle_sibling_bin") { |
| name = "fuchsia_component_test_middle_sibling" |
| edition = "2018" |
| deps = [ |
| ":echos-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//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" |
| } |
| |
| package("fuchsia_component_test_middle_sibling") { |
| deps = [ ":fuchsia_component_test_middle_sibling_bin" ] |
| |
| binary = "fuchsia_component_test_middle_sibling" |
| |
| meta = [ |
| { |
| path = rebase_path("meta/fuchsia_component_test_middle_sibling.cmx") |
| dest = "fuchsia_component_test_middle_sibling.cmx" |
| }, |
| ] |
| } |
| |
| rustc_binary("fuchsia_component_test_inner_bin") { |
| name = "fuchsia_component_test_inner" |
| edition = "2018" |
| 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" |
| } |
| |
| package("fuchsia_component_test_inner") { |
| deps = [ ":fuchsia_component_test_inner_bin" ] |
| |
| binary = "fuchsia_component_test_inner" |
| |
| meta = [ |
| { |
| path = rebase_path("meta/fuchsia_component_test_inner.cmx") |
| dest = "fuchsia_component_test_inner.cmx" |
| }, |
| ] |
| } |