blob: 63d1e423e625acbf72edb0249352b714d3d7c5b4 [file]
# 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/rust/rustc_test.gni")
import("//build/test/test_package.gni")
group("tests") {
testonly = true
deps = [ ":inspect_validator_tests" ]
}
validator_deps = [
"//src/diagnostics/inspect_validator/fidl:validate-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-url",
"//src/lib/inspect/rust/fuchsia-inspect",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:difference",
"//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",
"//third_party/rust_crates:thiserror",
]
rustc_binary("validator_bin") {
name = "validator"
edition = "2018"
deps = validator_deps
}
rustc_test("validator_bin_test") {
# TODO(tmandry): This is here to work around https://github.com/rust-lang/rust/issues/66036.
with_lto = "none"
edition = "2018"
source_root = "src/main.rs"
deps = validator_deps + [ "//src/lib/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"
},
]
}