blob: 8e31481a656aa0c741cc636e85f7cc5b4ac12144 [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.
# 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 = [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics-rustc",
"//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//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/inspect/rust/fuchsia-inspect-node-hierarchy",
"//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:base64",
"//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_json",
"//third_party/rust_crates:thiserror",
"//zircon/system/fidl/fuchsia-mem:fuchsia-mem-rustc",
]
rustc_binary("validator_bin") {
name = "validator"
edition = "2018"
deps = validator_deps
}
rustc_test("validator_bin_test") {
edition = "2018"
source_root = "src/main.rs"
deps = validator_deps + [ "//src/lib/fuchsia-async" ]
}
package("inspect_validator") {
testonly = true
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"
},
]
}