blob: 4ce0b63395a69cddeccf0c4d6e386d80e1cd5cf5 [file] [log] [blame]
# 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 = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust",
"//sdk/fidl/fuchsia.diagnostics.stream:fuchsia.diagnostics.stream_rust",
"//src/diagnostics/validator/logs/encoding/fidl:validate_rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
sources = [ "src/main.rs" ]
}
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 = "2021"
source_root = "src/test.rs"
sources = [ "src/test.rs" ]
deps = [
"//src/diagnostics/validator/logs/encoding/fidl:validate_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:tracing",
]
}
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",
]
}