blob: c28feb9c5d5018da7baced36a3270658dee8da21 [file] [log] [blame]
# 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")
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"
sources = [ "outer.rs" ]
}
test_package("fuchsia_component_test_outer") {
deps = [ ":fuchsia_component_test_outer_bin" ]
tests = [
{
name = "fuchsia_component_test_outer"
},
]
}
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"
sources = [ "middle.rs" ]
}
package("fuchsia_component_test_middle") {
deps = [ ":fuchsia_component_test_middle_bin" ]
binaries = [
{
name = "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"
sources = [ "middle_sibling.rs" ]
}
package("fuchsia_component_test_middle_sibling") {
deps = [ ":fuchsia_component_test_middle_sibling_bin" ]
binaries = [
{
name = "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"
sources = [ "inner.rs" ]
}
package("fuchsia_component_test_inner") {
deps = [ ":fuchsia_component_test_inner_bin" ]
binaries = [
{
name = "fuchsia_component_test_inner"
},
]
meta = [
{
path = rebase_path("meta/fuchsia_component_test_inner.cmx")
dest = "fuchsia_component_test_inner.cmx"
},
]
}