Debian Codegraph @

extra/protobuf/protobuf-24.4/pkg/test/BUILD.bazel

raw
1 # Tests for CMake file list generation
2
3 load("//pkg:build_systems.bzl", "gen_file_lists")
4 load("//pkg:cc_dist_library.bzl", "cc_dist_library")
5
6 cc_library(
7 name = "test_lib",
8 testonly = True,
9 srcs = ["test_lib.cc"],
10 hdrs = ["test_lib.h"],
11 )
12
13 cc_dist_library(
14 name = "test_lib_dist",
15 testonly = True,
16 deps = [":test_lib"],
17 )
18
19 gen_file_lists(
20 name = "gen_file_lists",
21 testonly = True,
22 out_stem = "file_lists",
23 src_libs = {
24 ":test_lib_dist": "libtest",
25 },
26 )
27
28 # This test checks the output from gen_file_lists() against a golden file.
29 sh_test(
30 name = "gen_file_lists_golden_test",
31 srcs = ["gen_file_lists_golden_test.sh"],
32 args = [
33 "$(location file_lists.cmake.golden)",
34 "$(location :gen_file_lists)",
35 ],
36 data = [
37 "file_lists.cmake.golden",
38 ":gen_file_lists",
39 ],
40 )