blob: 41f77e90e3e83732c47e173328b5868bbb99e084 [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.mem:fuchsia.mem-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//src/diagnostics/inspect_validator/fidl:validate-rustc",
"//src/lib/diagnostics/inspect/contrib/rust",
"//src/lib/diagnostics/inspect/node-hierarchy/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-url",
"//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",
]
rustc_binary("validator_bin") {
name = "validator"
edition = "2018"
deps = validator_deps
sources = [
"src/data.rs",
"src/data/fetch.rs",
"src/data/scanner.rs",
"src/main.rs",
"src/metrics.rs",
"src/puppet.rs",
"src/results.rs",
"src/runner.rs",
"src/trials.rs",
]
}
rustc_test("validator_bin_test") {
edition = "2018"
source_root = "src/main.rs"
deps = validator_deps + [ "//src/lib/fuchsia-async" ]
sources = [
"src/data.rs",
"src/data/fetch.rs",
"src/data/scanner.rs",
"src/main.rs",
"src/metrics.rs",
"src/puppet.rs",
"src/results.rs",
"src/runner.rs",
"src/trials.rs",
]
}
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"
},
]
}