| # Copyright 2019 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_test.gni") | |
| rustc_binary("bin") { | |
| testonly = true | |
| output_name = "encoding_validator" | |
| edition = "2024" | |
| with_unit_tests = true | |
| deps = [ | |
| "//sdk/fidl/fuchsia.diagnostics.types:fuchsia.diagnostics.types_rust", | |
| "//sdk/rust/zx", | |
| "//src/diagnostics/validator/logs/fidl:fuchsia.validate.logs_rust", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:log", | |
| ] | |
| sources = [ "src/main.rs" ] | |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] | |
| } | |
| fuchsia_unittest_package("encoding-validator-tests") { | |
| deps = [ ":bin_test" ] | |
| } | |
| fuchsia_component("validator-component") { | |
| testonly = true | |
| component_name = "validator" | |
| manifest = "meta/validator.cml" | |
| deps = [ ":bin" ] | |
| } | |
| fuchsia_package("validator") { | |
| testonly = true | |
| package_name = "log-encoding-validator" | |
| deps = [ ":validator-component" ] | |
| } | |
| rustc_test("test_bin") { | |
| name = "log_encoding_validator_test" | |
| edition = "2024" | |
| source_root = "src/test.rs" | |
| sources = [ "src/test.rs" ] | |
| deps = [ | |
| "//src/diagnostics/validator/logs/fidl:fuchsia.validate.logs_rust", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-component", | |
| "//third_party/rust_crates:log", | |
| ] | |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] | |
| } | |
| fuchsia_test_component("component") { | |
| component_name = "validator_test" | |
| manifest = "meta/test.cml" | |
| deps = [ ":test_bin" ] | |
| } | |
| fuchsia_test_package("log-encoding-validator-rust") { | |
| deps = [ ":test_bin" ] | |
| subpackages = [ ":validator" ] | |
| renameable_subpackages = [ | |
| { | |
| name = "puppet" | |
| package = "//src/diagnostics/validator/logs/encoding/puppet/rust" | |
| }, | |
| ] | |
| test_components = [ ":component" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| ":encoding-validator-tests", | |
| ":log-encoding-validator-rust", | |
| ] | |
| } |