blob: 7a8b182519fa8084784f4c9d781ab38bca02a83e [file]
# 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("@platforms//host:constraints.bzl", "HOST_CONSTRAINTS")
load("//build/bazel/rules/host_tests:host_rustc_test.bzl", "host_rustc_test")
load("//build/bazel/rules/rust:defs.bzl", "rustc_binary", "rustc_library")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "gtest_test_parser_lib",
srcs = [
"src/child_guard.rs",
"src/lib.rs",
"src/parser.rs",
"src/schema.rs",
],
crate_name = "gtest_test_parser",
edition = "2024",
target_compatible_with = HOST_CONSTRAINTS,
visibility = ["//visibility:public"],
deps = [
"//third_party/rust_crates/vendor:regex",
"//third_party/rust_crates/vendor:serde",
],
)
host_rustc_test(
name = "gtest_test_parser_lib_tests",
srcs = [
"src/child_guard.rs",
"src/lib.rs",
"src/parser.rs",
"src/schema.rs",
],
crate_root = "src/lib.rs",
edition = "2024",
target_compatible_with = HOST_CONSTRAINTS,
visibility = ["//tools:__pkg__"],
deps = [
"//third_party/rust_crates/vendor:regex",
"//third_party/rust_crates/vendor:serde",
"//third_party/rust_crates/vendor:serde_json",
],
)
rustc_binary(
name = "gtest_test_parser",
srcs = [
"src/main.rs",
],
edition = "2024",
target_compatible_with = HOST_CONSTRAINTS,
visibility = ["//visibility:public"],
deps = [
":gtest_test_parser_lib",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:argh",
"//third_party/rust_crates/vendor:serde_json",
],
)