move test-cmd guts to separate sig-cli maintained directory

pull/8/head
David Eads 2018-07-05 09:04:56 -04:00
parent 6e08dd2293
commit a6f5dddc4f
6 changed files with 47 additions and 10 deletions

View File

@ -20,8 +20,8 @@ sh_binary(
name = "test-cmd",
srcs = ["test-cmd.sh"],
deps = [
":test-cmd-util",
"//hack/lib",
"//test/cmd:all-srcs",
],
)
@ -89,14 +89,6 @@ sh_binary(
],
)
sh_library(
name = "test-cmd-util",
srcs = [
"test-cmd-util.sh",
],
data = ["//pkg/kubectl/validation:testdata/v1/validPod.yaml"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),

View File

@ -24,7 +24,7 @@ set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
source "${KUBE_ROOT}/hack/lib/init.sh"
source "${KUBE_ROOT}/hack/lib/test.sh"
source "${KUBE_ROOT}/hack/make-rules/test-cmd-util.sh"
source "${KUBE_ROOT}/test/cmd/legacy-script.sh"
function run_kube_apiserver() {
kube::log::status "Building kube-apiserver"

View File

@ -11,6 +11,7 @@ filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//test/cmd:all-srcs",
"//test/conformance:all-srcs",
"//test/e2e:all-srcs",
"//test/e2e_kubeadm:all-srcs",

40
test/cmd/BUILD Normal file
View File

@ -0,0 +1,40 @@
# 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 = [
"legacy-script.sh",
],
data = ["//pkg/kubectl/validation:testdata/v1/validPod.yaml"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

4
test/cmd/OWNERS Normal file
View File

@ -0,0 +1,4 @@
approvers:
- sig-cli-maintainers
reviewers:
- sig-cli