blob: 6a2cf77f7f5c3036ba16b1df85e92ade825b7c58 [file] [log] [blame]
# Copyright 2021 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/rust/rustc_binary.gni")
import("//build/testing/host_test_data.gni")
if (is_host) {
rustc_binary("validator") {
edition = "2021"
name = "thermal_config_validator"
with_unit_tests = true
deps = [
"//src/power/power-manager/thermal_config/parser",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
]
test_deps = [
":invalid_thermal_test_configs",
":valid_thermal_test_configs",
"//third_party/rust_crates:tempfile",
]
sources = [ "src/main.rs" ]
}
host_test_data("valid_thermal_test_configs") {
sources = [ "../test_configs/valid_test_config.json5" ]
outputs =
[ "${root_out_dir}/valid_thermal_test_configs/{{source_file_part}}" ]
}
host_test_data("invalid_thermal_test_configs") {
sources = [ "../test_configs/invalid_test_config.json5" ]
outputs =
[ "${root_out_dir}/invalid_thermal_test_configs/{{source_file_part}}" ]
}
}
group("tests") {
testonly = true
deps = [ ":validator_test($host_toolchain)" ]
}