| # Copyright 2026 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. | |
| load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS") | |
| load("//build/bazel/rules/host:defs.bzl", "rustc_binary_host_tool") | |
| load("//build/bazel/rules/host_tests:host_rustc_test.bzl", "host_rustc_test") | |
| package(default_applicable_licenses = ["//:license"]) | |
| rustc_binary_host_tool( | |
| name = "testing_metadata_bin", | |
| srcs = ["src/main.rs"], | |
| compile_data = [ | |
| "testing_input.schema.json", | |
| "testing_metadata.schema.json", | |
| ], | |
| crate_name = "testing_metadata", | |
| edition = "2024", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| deps = [ | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:argh", | |
| "//third_party/rust_crates/vendor:serde", | |
| "//third_party/rust_crates/vendor:serde_json", | |
| "//third_party/rust_crates/vendor:serde_json5", | |
| "//third_party/rust_crates/vendor:valico", | |
| "//third_party/rust_crates/vendor:walkdir", | |
| ], | |
| ) | |
| host_rustc_test( | |
| name = "testing_metadata_bin_test", | |
| crate = ":testing_metadata_bin", | |
| edition = "2024", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| visibility = ["//tools:__pkg__"], | |
| deps = [ | |
| "//third_party/rust_crates/vendor:pretty_assertions", | |
| "//third_party/rust_crates/vendor:tempfile", | |
| ], | |
| ) |