blob: d3e278bd28da5180060c3df2fe5fc56b7b81444a [file] [log] [blame]
# Copyright 2020 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("bin") {
output_name = "sink_validator"
edition = "2018"
with_unit_tests = true
deps = [
"fidl:sink-puppet-rustc",
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics-rustc",
"//sdk/fidl/fuchsia.diagnostics.stream:fuchsia.diagnostics.stream-rustc",
"//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//src/lib/diagnostics/log/encoding/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:proptest",
"//third_party/rust_crates:proptest-derive",
"//third_party/rust_crates:tracing",
]
sources = [ "src/main.rs" ]
}
rustc_binary("bin-e2e-test") {
output_name = "sink_validator_e2e"
edition = "2018"
with_unit_tests = true
deps = [
"fidl:sink-puppet-rustc",
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics-rustc",
"//sdk/fidl/fuchsia.diagnostics.stream:fuchsia.diagnostics.stream-rustc",
"//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//src/lib/diagnostics/data/rust",
"//src/lib/diagnostics/log/encoding/rust",
"//src/lib/diagnostics/reader/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:proptest",
"//third_party/rust_crates:proptest-derive",
"//third_party/rust_crates:tracing",
]
source_root = "e2e/main.rs"
sources = [ "e2e/main.rs" ]
}
fuchsia_unittest_package("sink-validator-tests") {
deps = [ ":bin_test" ]
}
### SDK ###
fuchsia_component("sink-validator-for-sdk") {
manifest = "meta/validator-sdk.cmx"
deps = [ ":bin" ]
}
fuchsia_test_package("log-sink-validator-sdk") {
deps = [ "puppet/sdk:component" ]
test_components = [ ":sink-validator-for-sdk" ]
}
### C++ ###
fuchsia_component("sink-validator-for-cpp") {
manifest = "meta/validator-cpp.cmx"
deps = [ ":bin" ]
}
fuchsia_test_package("log-sink-validator-cpp") {
deps = [ "puppet/cpp:component" ]
test_components = [ ":sink-validator-for-cpp" ]
}
### E2E C++ ###
fuchsia_component("sink-validator-for-cpp-e2e") {
manifest = "meta/validator-cpp-e2e.cmx"
deps = [ ":bin-e2e-test" ]
}
fuchsia_test_package("log-sink-validator-cpp-e2e") {
deps = [ "puppet/cpp:component" ]
test_components = [ ":sink-validator-for-cpp-e2e" ]
}
### Rust ###
fuchsia_component("sink-validator-for-rust") {
manifest = "meta/validator-rust.cmx"
deps = [ ":bin" ]
}
fuchsia_test_package("log-sink-validator-rust") {
deps = [ "puppet/rust:component" ]
test_components = [ ":sink-validator-for-rust" ]
}
group("tests") {
testonly = true
deps = [
":log-sink-validator-cpp",
":log-sink-validator-cpp-e2e",
":log-sink-validator-rust",
":log-sink-validator-sdk",
":sink-validator-tests",
]
}