blob: 64b583c3f2652a5a1aca918f02462eaf0b9b2932 [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.
import("//build/components.gni")
import("//build/rust/rustc_binary.gni")
rustc_binary("stub_inspect_component_bin") {
testonly = true
output_name = "stub_inspect_component"
edition = "2018"
source_root = "src/stub_inspect_component.rs"
deps = [
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
sources = [ "src/stub_inspect_component.rs" ]
}
rustc_binary("log_and_exit_component_bin") {
testonly = true
output_name = "log_and_exit"
edition = "2018"
source_root = "src/log_and_exit.rs"
deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates:tracing",
]
sources = [ "src/log_and_exit.rs" ]
}
rustc_binary("log_and_crash_component_bin") {
testonly = true
output_name = "log_and_crash"
edition = "2018"
source_root = "src/log_and_crash.rs"
deps = [
"//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc",
"//src/diagnostics/archivist:lib",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
]
sources = [ "src/log_and_crash.rs" ]
}
fuchsia_component("stub_inspect_component") {
testonly = true
deps = [ ":stub_inspect_component_bin" ]
manifest = "meta/stub_inspect_component.cml"
}
fuchsia_component("component_with_children") {
testonly = true
deps = [ ":stub_inspect_component_bin" ]
manifest = "meta/component_with_children.cml"
}
fuchsia_component("log_and_exit_component") {
testonly = true
component_name = "log-and-exit"
deps = [ ":log_and_exit_component_bin" ]
manifest = "meta/log-and-exit.cml"
}
fuchsia_component("log_and_crash_component") {
component_name = "log-and-crash"
testonly = true
deps = [ ":log_and_crash_component_bin" ]
manifest = "meta/log-and-crash.cml"
}
rustc_binary("socket_puppet_bin") {
testonly = true
name = "socket_puppet"
source_root = "src/socket_puppet.rs"
deps = [
"//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc",
"//src/diagnostics/archivist/tests/v2/components/fidl:fidl-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:futures",
]
sources = [ "src/socket_puppet.rs" ]
}
fuchsia_component("socket-puppet") {
testonly = true
manifest = "meta/socket-puppet.cml"
deps = [ ":socket_puppet_bin" ]
}
group("components") {
testonly = true
deps = [
":component_with_children",
":log_and_crash_component",
":log_and_exit_component",
":socket-puppet",
":stub_inspect_component",
]
}