blob: 2428c11784504aa7415986a62009271b7159d17b [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")
import("//build/rust/rustc_library.gni")
import("//build/rust/rustc_test.gni")
rustc_binary("reporter_bin") {
name = "reporter"
edition = "2018"
source_root = "reporter.rs"
testonly = true
deps = [
"//examples/components/routing/fidl:echo-rustc",
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//src/lib/diagnostics/reader/rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
]
sources = [ "reporter.rs" ]
}
rustc_binary("child_bin") {
name = "child"
edition = "2018"
source_root = "child.rs"
testonly = true
deps = [
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:futures",
]
sources = [ "child.rs" ]
}
rustc_binary("cleanup_bin") {
name = "cleanup"
edition = "2018"
source_root = "cleanup.rs"
testonly = true
deps = [
"//sdk/fidl/fuchsia.component:fuchsia.component-rustc",
"//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl-rustc",
"//src/lib/diagnostics/reader/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-component-test",
"//src/sys/lib/component-events",
]
sources = [ "cleanup.rs" ]
}
rustc_test("bin") {
name = "diagnostics_integration_test"
edition = "2018"
source_root = "integration_test.rs"
deps = [
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component-test",
"//src/sys/lib/cm_rust",
"//src/sys/lib/component-events",
]
sources = [ "integration_test.rs" ]
}
fuchsia_component("reporter") {
testonly = true
deps = [ ":reporter_bin" ]
manifest = "meta/reporter.cml"
}
fuchsia_component("parent") {
testonly = true
manifest = "meta/parent.cml"
}
fuchsia_component("child") {
testonly = true
deps = [ ":child_bin" ]
manifest = "meta/child.cml"
}
fuchsia_component("cleanup") {
testonly = true
deps = [ ":cleanup_bin" ]
manifest = "meta/cleanup.cml"
}
fuchsia_component("cleanup-root") {
testonly = true
manifest = "meta/cleanup-root.cml"
}
fuchsia_component("component-manager-inspect") {
testonly = true
manifest = "meta/component-manager-inspect.cml"
}
fuchsia_unittest_package("diagnostics-integration-test") {
manifest = "meta/diagnostics-integration-test.cml"
deps = [
":bin",
":child",
":cleanup",
":cleanup-root",
":component-manager-inspect",
":parent",
":reporter",
"//src/diagnostics/archivist:archivist-for-embedding-v2",
"//src/sys/component_manager:component-manager-realm-builder-debug-cmp",
]
}
group("tests") {
testonly = true
deps = [ ":diagnostics-integration-test" ]
}