| # 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 = "2021" |
| with_unit_tests = true |
| testonly = true |
| deps = [ |
| "fidl:sink-puppet_rust", |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust", |
| "//sdk/fidl/fuchsia.diagnostics.stream:fuchsia.diagnostics.stream_rust", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_rust", |
| "//src/lib/diagnostics/log/encoding/rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/component-events", |
| "//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" ] |
| } |
| |
| fuchsia_unittest_package("sink-validator-tests") { |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ ":bin_test" ] |
| } |
| |
| ### SDK ### |
| |
| fuchsia_component("sink-validator-for-sdk") { |
| testonly = true |
| manifest = "meta/validator-sdk.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_test_package("log-sink-validator-sdk") { |
| deps = [ "puppet/sdk:component" ] |
| test_components = [ ":sink-validator-for-sdk" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| ### C++ ### |
| |
| fuchsia_component("sink-validator-for-cpp") { |
| testonly = true |
| manifest = "meta/validator-cpp.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_test_package("log-sink-validator-cpp") { |
| deps = [ "puppet/cpp:component" ] |
| test_components = [ ":sink-validator-for-cpp" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| ### Rust ### |
| |
| fuchsia_component("sink-validator-for-rust") { |
| testonly = true |
| manifest = "meta/validator-rust.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_test_package("log-sink-validator-rust") { |
| deps = [ "puppet/rust:component" ] |
| test_components = [ ":sink-validator-for-rust" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":log-sink-validator-cpp", |
| ":log-sink-validator-rust", |
| ":log-sink-validator-sdk", |
| ":sink-validator-tests", |
| ] |
| } |