From ca79547e9275e3155b0ef2872040d574918f482f Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Fri, 6 Jul 2018 16:08:20 -0700 Subject: [PATCH 1/3] fix visibility of testdata for //test/cmd:legacy-script --- build/visible_to/BUILD | 1 + hack/make-rules/BUILD | 2 +- test/cmd/BUILD | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/visible_to/BUILD b/build/visible_to/BUILD index 9ba4b3ce50c..516d33cb198 100644 --- a/build/visible_to/BUILD +++ b/build/visible_to/BUILD @@ -40,6 +40,7 @@ package_group( "//hack", "//hack/lib", "//hack/make-rules", + "//test/cmd", "//test/e2e/...", "//test/integration/...", ], diff --git a/hack/make-rules/BUILD b/hack/make-rules/BUILD index ee15dba5f7f..fa982fcef3b 100644 --- a/hack/make-rules/BUILD +++ b/hack/make-rules/BUILD @@ -21,7 +21,7 @@ sh_binary( srcs = ["test-cmd.sh"], deps = [ "//hack/lib", - "//test/cmd:all-srcs", + "//test/cmd:legacy-script", ], ) diff --git a/test/cmd/BUILD b/test/cmd/BUILD index 44735185762..9713b6dc582 100644 --- a/test/cmd/BUILD +++ b/test/cmd/BUILD @@ -48,6 +48,7 @@ sh_library( "version.sh", ], data = ["//pkg/kubectl/validation:testdata/v1/validPod.yaml"], + visibility = ["//visibility:public"], ) filegroup( From 0b43710604938b9645c03042eae399bc60d50c05 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Fri, 6 Jul 2018 16:25:28 -0700 Subject: [PATCH 2/3] switch to glob --- test/cmd/BUILD | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/test/cmd/BUILD b/test/cmd/BUILD index 9713b6dc582..772be10357b 100644 --- a/test/cmd/BUILD +++ b/test/cmd/BUILD @@ -19,34 +19,7 @@ sh_library( name = "legacy-script", - srcs = [ - "apply.sh", - "apps.sh", - "authorization.sh", - "batch.sh", - "certificate.sh", - "core.sh", - "crd.sh", - "create.sh", - "diff.sh", - "discovery.sh", - "generic-resources.sh", - "get.sh", - "initializers.sh", - "kubeconfig.sh", - "legacy-script.sh", - "node-management.sh", - "old-print.sh", - "plugins.sh", - "proxy.sh", - "rbac.sh", - "request-timeout.sh", - "run.sh", - "save-config.sh", - "storage.sh", - "template-output.sh", - "version.sh", - ], + srcs = glob(["*.sh"]), data = ["//pkg/kubectl/validation:testdata/v1/validPod.yaml"], visibility = ["//visibility:public"], ) From 2583c122687ac7b1000bfa48571044790d5c28c2 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Fri, 6 Jul 2018 16:26:56 -0700 Subject: [PATCH 3/3] delete copied comment --- test/cmd/BUILD | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/test/cmd/BUILD b/test/cmd/BUILD index 772be10357b..136d0c6b998 100644 --- a/test/cmd/BUILD +++ b/test/cmd/BUILD @@ -1,22 +1,3 @@ -# Scripts runnable from make, e.g. -# -# cd $GOPATH/src/k8s.io/kubernetes -# make test-e2e-node -# -# The sh_binary rules below exist only to validate -# dependencies; if a shell dependency is accidentally -# deleted, a presubmit BUILD will fail. -# -# If the scripts sourced their dependencies from -# $RUNFILES (rather than $BASH_SOURCE/../.. or -# whatever), then bazel build hack/... would install -# runnable, hermetically sealed shell "binaries". -# E.g. the following command would work: -# -# ./bazel-bin/hack/make-rules/test-e2e-node -# -# TODO(#47064): Should be a sh_test instead of sh_binary - sh_library( name = "legacy-script", srcs = glob(["*.sh"]),