dep-protobuf/pkg/test/BUILD.bazel
Keith Smiley 68220a862a bazel: add missing rules_cc loads (#23584)
This is required for use with bazel after this commit 71ca0ed111

Many files have these already

Closes #23584

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/23584 from keith:ks/bazel-add-missing-rules_cc-loads 733a0ccf6f
PiperOrigin-RevId: 817836399
2025-10-10 17:00:33 -07:00

42 lines
975 B
Text

# Tests for CMake file list generation
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_shell//shell:sh_test.bzl", "sh_test")
load("//pkg:build_systems.bzl", "gen_file_lists")
load("//pkg:cc_dist_library.bzl", "cc_dist_library")
cc_library(
name = "test_lib",
testonly = True,
srcs = ["test_lib.cc"],
hdrs = ["test_lib.h"],
)
cc_dist_library(
name = "test_lib_dist",
testonly = True,
deps = [":test_lib"],
)
gen_file_lists(
name = "gen_file_lists",
testonly = True,
out_stem = "file_lists",
src_libs = {
":test_lib_dist": "libtest",
},
)
# This test checks the output from gen_file_lists() against a golden file.
sh_test(
name = "gen_file_lists_golden_test",
srcs = ["gen_file_lists_golden_test.sh"],
args = [
"$(location file_lists.cmake.golden)",
"$(location :gen_file_lists)",
],
data = [
"file_lists.cmake.golden",
":gen_file_lists",
],
)