| # 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_tests:host_rustc_test.bzl", "host_rustc_test") | |
| load("//build/bazel/rules/rust:rustc_binary.bzl", "rustc_binary") | |
| package(default_applicable_licenses = ["//:license"]) | |
| rustc_binary( | |
| name = "bin", | |
| srcs = ["src/main.rs"], | |
| build_flags = ["//build/config/rust/lints:deny_unused_results"], | |
| crate_name = "expectation_file_preprocessor", | |
| edition = "2024", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| deps = [ | |
| "//src/lib/testing/expectation/ser", | |
| "//third_party/rust_crates/vendor:argh", | |
| "//third_party/rust_crates/vendor:glob", | |
| "//third_party/rust_crates/vendor:serde_json5", | |
| ], | |
| ) | |
| host_rustc_test( | |
| name = "bin_test", | |
| build_flags = ["//build/config/rust/lints:deny_unused_results"], | |
| crate = ":bin", | |
| crate_name = "expectation_file_preprocessor_bin_test", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| deps = [ | |
| "//third_party/rust_crates/vendor:pathdiff", | |
| "//third_party/rust_crates/vendor:pretty_assertions", | |
| "//third_party/rust_crates/vendor:serde_json", | |
| "//third_party/rust_crates/vendor:tempfile", | |
| ], | |
| ) |