| # 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("go-puppet-dispatcher-bin") { |
| edition = "2021" |
| testonly = true |
| |
| deps = [ |
| "//src/connectivity/network/netstack/inspect/validator/puppet-internal/fidl:validate_rust", |
| "//src/diagnostics/validator/inspect/fidl:validate_rust", |
| "//src/lib/diagnostics/inspect/runtime/rust", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:futures", |
| ] |
| sources = [ "src/main.rs" ] |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| } |
| |
| # This must be named puppet or have `component_name = "puppet"` so |
| # `children: url: "#meta/puppet.cm"` in |
| # //src/diagnostics/validator/inspect/meta/validator.shard.cml can find it. |
| fuchsia_unittest_component("go-puppet-dispatcher") { |
| deps = [ ":go-puppet-dispatcher-bin" ] |
| component_name = "puppet" |
| manifest = "meta/puppet.cml" |
| } |
| |
| # The parent component of #validator and #puppet. |
| fuchsia_test_component("inspect-validator-test-component") { |
| component_name = "validator-test" |
| manifest = "meta/test.cml" |
| } |
| |
| fuchsia_package("puppet") { |
| testonly = true |
| deps = [ ":go-puppet-dispatcher" ] |
| subpackages = [ |
| "//src/connectivity/network/netstack/inspect/validator/puppet-internal", |
| ] |
| } |
| |
| fuchsia_test_package("inspect-validator-tests-go") { |
| subpackages = [ |
| ":puppet", |
| "//src/diagnostics/validator/inspect:validator", |
| ] |
| test_components = [ ":inspect-validator-test-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":inspect-validator-tests-go" ] |
| } |