From 4b67f5ff384d1d2b0925299e0c1919d36b4ecaab Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Mon, 28 Jan 2019 13:51:57 -0500 Subject: [PATCH] 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. --- BUILD | 1 + rules/BUILD | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/BUILD b/BUILD index ad98f37..6630132 100644 --- a/BUILD +++ b/BUILD @@ -15,6 +15,7 @@ filegroup( srcs = [ "BUILD", "//lib:test_deps", + "//rules:test_deps", "//toolchains/unittest:test_deps", ] + glob(["*.bzl"]), ) diff --git a/rules/BUILD b/rules/BUILD index 7ab4c30..e161093 100644 --- a/rules/BUILD +++ b/rules/BUILD @@ -2,16 +2,16 @@ load("//:bzl_library.bzl", "bzl_library") licenses(["notice"]) +package(default_visibility = ["//visibility:public"]) + bzl_library( name = "build_test", srcs = ["build_test.bzl"], - visibility = ["//visibility:public"], ) bzl_library( name = "maprule", srcs = ["maprule.bzl"], - visibility = ["//visibility:public"], deps = [":maprule_private"], ) @@ -28,3 +28,12 @@ bzl_library( # Exported for build_test.bzl to make sure of, it is an implementation detail # of the rule and should not be directly used by anything else. exports_files(["empty_test.sh"]) + +filegroup( + name = "test_deps", + testonly = True, + srcs = [ + "BUILD", + "empty_test.sh", + ] + glob(["*.bzl"]), +)