blob: 3bcb11bccbae8c1dc8d8649271bf5d61ad67726b [file] [log] [blame]
# Copyright 2019 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/package/component.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
rustc_binary("routing_integration_test_bin") {
name = "routing_integration_test"
edition = "2018"
source_root = "routing_integration_test.rs"
deps = [
"//garnet/lib/rust/cm_fidl_translator",
"//garnet/public/rust/fdio",
"//garnet/public/rust/fuchsia-async",
"//garnet/public/rust/fuchsia-component",
"//garnet/public/rust/fuchsia-runtime",
"//garnet/public/rust/fuchsia-zircon",
"//sdk/fidl/fuchsia.data:fuchsia.data-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//third_party/rust_crates:failure",
]
}
rustc_binary("mock_pkg_resolver_bin") {
name = "mock_pkg_resolver"
edition = "2018"
source_root = "mock_pkg_resolver.rs"
deps = [
"//garnet/lib/rust/fuchsia_uri",
"//garnet/public/lib/fidl/rust/fidl",
"//garnet/public/rust/fdio",
"//garnet/public/rust/fuchsia-async",
"//garnet/public/rust/fuchsia-component",
"//garnet/public/rust/fuchsia-syslog",
"//garnet/public/rust/fuchsia-zircon",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//third_party/rust_crates:failure",
"//third_party/rust_crates:futures-preview",
"//third_party/rust_crates:lazy_static",
"//zircon/public/fidl/fuchsia-io:fuchsia-io-rustc",
]
}
test_package("routing_integration_test") {
deps = [
":mock_pkg_resolver_bin",
":routing_integration_test_bin",
"//examples/components/routing/echo_server",
"//examples/components/routing/echo_client",
]
components = [
"//src/sys/component_manager:component_manager_as_v1_component",
]
meta = [
{
path = rebase_path("meta/mock_pkg_resolver_for_routing_integration_test.cmx")
dest = "mock_pkg_resolver.cmx"
},
{
path = rebase_path("//examples/components/routing/meta/echo_server.cml")
dest = "echo_server.cm"
},
{
path = rebase_path("//examples/components/routing/meta/echo_client.cml")
dest = "echo_client.cm"
},
{
path = rebase_path("meta/echo_realm.cml")
dest = "echo_realm.cm"
},
]
binaries = [
{
name = "mock_pkg_resolver"
},
{
name = "echo_server"
},
{
name = "echo_client"
},
]
tests = [
{
name = "routing_integration_test"
},
]
}
rustc_binary("elf_runner_test_bin") {
name = "elf_runner_test"
edition = "2018"
source_root = "elf_runner_test.rs"
deps = [
"//garnet/lib/rust/cm_fidl_translator",
"//garnet/public/rust/fdio",
"//garnet/public/rust/fuchsia-async",
"//garnet/public/rust/fuchsia-component",
"//garnet/public/rust/fuchsia-runtime",
"//garnet/public/rust/fuchsia-zircon",
"//sdk/fidl/fuchsia.data:fuchsia.data-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//third_party/rust_crates:failure",
]
}
test_package("elf_runner_test") {
deps = [
":elf_runner_test_bin",
":mock_pkg_resolver_bin",
"//examples/components/basic:echo_args_bin",
]
components = [
"//src/sys/component_manager:component_manager_as_v1_component",
]
meta = [
{
path = rebase_path("meta/mock_pkg_resolver_for_elf_runner_test.cmx")
dest = "mock_pkg_resolver.cmx"
},
{
path = rebase_path("meta/echo_no_args.cml")
dest = "echo_no_args.cm"
},
{
path = rebase_path("//examples/components/basic/meta/echo_args.cml")
dest = "echo_args.cm"
},
]
binaries = [
{
name = "mock_pkg_resolver"
},
{
name = "echo_args"
},
]
tests = [
{
name = "elf_runner_test"
},
]
}
rustc_binary("no_pkg_resolver_test_bin") {
name = "no_pkg_resolver_test"
edition = "2018"
source_root = "no_pkg_resolver_test.rs"
deps = [
"//garnet/public/rust/fuchsia-async",
"//src/sys/component_manager:lib",
]
}
test_package("no_pkg_resolver_test") {
deps = [
":no_pkg_resolver_test_bin",
]
tests = [
{
name = "no_pkg_resolver_test"
},
]
}