blob: e4f8317b8648ca77236cadb0b6eef05ad168e93a [file] [log] [blame]
# 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.
# [START imports]
import("//build/components.gni")
import("//build/rust/rustc_test.gni")
# [END imports]
# [START example_snippet]
# [START executable]
rustc_test("bin") {
name = "echo_integration_test_rust"
edition = "2021"
deps = [
"//examples/components/routing/fidl:echo_rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
]
sources = [ "src/lib.rs" ]
}
# [END executable]
# [START component]
fuchsia_component("echo_integration_test_component") {
testonly = true
component_name = "echo_integration_test"
manifest = "meta/echo_integration_test.cml"
deps = [ ":bin" ]
}
# [END component]
# [START test_package]
fuchsia_test_package("echo_integration_test_rust") {
test_components = [ ":echo_integration_test_component" ]
deps = [ "//examples/components/routing/rust/echo_server:echo_server_cmp" ]
}
# [END test_package]
# [END example_snippet]
fuchsia_test_package_with_default_component(
"subpackaged_echo_integration_test_rust") {
manifest = "meta/subpackaged_echo_integration_test.cml"
deps = [ ":bin" ]
subpackages = [ "//examples/components/routing/rust/echo_server" ]
}
group("tests") {
testonly = true
deps = [
":echo_integration_test_rust",
":subpackaged_echo_integration_test_rust",
]
}