...
1load(
2 "//:def.bzl",
3 "gazelle_binary",
4 "gazelle_generation_test",
5)
6
7load("//tests:tools.bzl", "get_binary")
8
9# Exclude this entire directly from having anything gnerated by Gazelle. That
10# way the test cases won't be fixed by `bazel run //:gazelle` when run in this
11# repository.
12# gazelle:exclude **
13
14# This test Gazelle binary only has the "test_filegroup" plugin installed.
15gazelle_binary(
16 name = "gazelle",
17 languages = [
18 "//internal/language/test_filegroup",
19 ],
20 visibility = ["//visibility:private"],
21)
22
23gazelle_binary(
24 name = "gazelle_with_language_loads_from_flag",
25 languages = [
26 "//internal/language/test_loads_from_flag",
27 ],
28 visibility = ["//visibility:private"],
29)
30
31gazelle_binary(
32 name = "gazelle_with_language_load_for_packed_rules",
33 languages = [
34 "//internal/language/test_load_for_packed_rules",
35 ],
36 visibility = ["//visibility:private"],
37)
38
39[gazelle_generation_test(
40 # Name the test the path to the directory containing the WORKSPACE file.
41 name = file[0:-len("/WORKSPACE")],
42 gazelle_binary = get_binary(file),
43 # This is a noop as the default is False. However, it does confirm that
44 # gazelle_generation_test accepts setting common test attributes.
45 local = False,
46 test_data = glob(
47 include = [file[0:-len("/WORKSPACE")] + "/**"],
48 ),
49) for file in glob(
50 include = ["**/WORKSPACE"],
51)]
View as plain text