| # 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. |
| |
| # NOTE: the contents of this file have been copied into documentation located at |
| # //docs/development/languages/rust/testing.md. Please update the snippets |
| # in that file if the contents below are changed. |
| |
| import("//build/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/test/test_package.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":inspect_validator_tests", |
| ] |
| } |
| |
| rustc_binary("validator_bin") { |
| name = "validator" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//garnet/public/rust/fuchsia-async", |
| "//garnet/public/rust/fuchsia-component", |
| "//garnet/public/rust/fuchsia-syslog", |
| "//garnet/public/rust/fuchsia-zircon", |
| "//src/diagnostics/inspect_validator/fidl:validate-rustc", |
| "//src/lib/argh", |
| "//src/lib/inspect/rust/fuchsia-inspect", |
| "//src/sys/lib/fuchsia_url", |
| "//third_party/rust_crates:difference", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:num-derive", |
| "//third_party/rust_crates:num-traits", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_derive", |
| "//third_party/rust_crates:serde_json", |
| ] |
| test_deps = [ "//garnet/public/rust/fuchsia-async" ] |
| } |
| |
| package("inspect_validator") { |
| deps = [ |
| ":validator_bin", |
| ] |
| |
| tests = [ |
| { |
| name = "validator" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/validator.cmx") |
| dest = "validator.cmx" |
| }, |
| ] |
| } |
| |
| test_package("inspect_validator_tests") { |
| deps = [ |
| ":validator_bin_test", |
| ] |
| |
| tests = [ |
| { |
| name = "validator_bin_test" |
| }, |
| ] |
| } |