Skip to content

Commit 4b67f5f

Browse files
thomasvlc-parsons
authored andcommitted
Add rules to the test_deps target. (#102)
* Add rules to the test_deps target. Likely needed for anyone doing integration tests using skylib. * Default public visibility and only tag things that are private.
1 parent 97dc99e commit 4b67f5f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ filegroup(
1515
srcs = [
1616
"BUILD",
1717
"//lib:test_deps",
18+
"//rules:test_deps",
1819
"//toolchains/unittest:test_deps",
1920
] + glob(["*.bzl"]),
2021
)

rules/BUILD

+11-2
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ load("//:bzl_library.bzl", "bzl_library")
22

33
licenses(["notice"])
44

5+
package(default_visibility = ["//visibility:public"])
6+
57
bzl_library(
68
name = "build_test",
79
srcs = ["build_test.bzl"],
8-
visibility = ["//visibility:public"],
910
)
1011

1112
bzl_library(
1213
name = "maprule",
1314
srcs = ["maprule.bzl"],
14-
visibility = ["//visibility:public"],
1515
deps = [":maprule_private"],
1616
)
1717

@@ -28,3 +28,12 @@ bzl_library(
2828
# Exported for build_test.bzl to make sure of, it is an implementation detail
2929
# of the rule and should not be directly used by anything else.
3030
exports_files(["empty_test.sh"])
31+
32+
filegroup(
33+
name = "test_deps",
34+
testonly = True,
35+
srcs = [
36+
"BUILD",
37+
"empty_test.sh",
38+
] + glob(["*.bzl"]),
39+
)

0 commit comments

Comments
 (0)