| # 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") |
| |
| rustc_binary("bin") { |
| output_name = "encoding_validator" |
| edition = "2018" |
| with_unit_tests = true |
| deps = [ |
| "fidl:validate-rustc", |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics-rustc", |
| "//sdk/fidl/fuchsia.diagnostics.stream:fuchsia.diagnostics.stream-rustc", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_unittest_package("encoding-validator-tests") { |
| deps = [ ":bin_test" ] |
| } |
| |
| ### C++ ### |
| |
| fuchsia_component("encoding-validator-for-cpp") { |
| manifest = "meta/validator-cpp.cmx" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_test_package("log-encoding-validator-cpp") { |
| deps = [ "puppet/cpp:component" ] |
| test_components = [ ":encoding-validator-for-cpp" ] |
| } |
| |
| ### Dart ### |
| |
| fuchsia_component("encoding-validator-for-dart") { |
| manifest = "meta/validator-dart.cmx" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_test_package("log-encoding-validator-dart") { |
| test_components = [ ":encoding-validator-for-dart" ] |
| } |
| |
| ### Rust ### |
| |
| fuchsia_component("encoding-validator-for-rust") { |
| manifest = "meta/validator-rust.cmx" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_test_package("log-encoding-validator-rust") { |
| deps = [ "puppet/rust:component" ] |
| test_components = [ ":encoding-validator-for-rust" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":encoding-validator-tests", |
| ":log-encoding-validator-cpp", |
| ":log-encoding-validator-dart", |
| ":log-encoding-validator-rust", |
| |
| # TODO(fxbug.dev/62620) migrate dart puppet to new component templates and move to package deps |
| "puppet/dart:log-validator-dart-puppet", |
| ] |
| } |