mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Allow hack/test-go.sh to support flags
Pass arguments after the package directly to go test hack/test-go.sh pkg/util -v -test.run=TestNewStringSet And also allow global flags hack/test-go.sh "" -v
This commit is contained in:
parent
9d001564bf
commit
8b06cd8e01
@ -39,10 +39,10 @@ find_test_dirs() {
|
||||
cd "${KUBE_TARGET}"
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
go test -race -cover -coverprofile="tmp.out" "$KUBE_GO_PACKAGE/$1"
|
||||
go test -race -cover -coverprofile="tmp.out" "$KUBE_GO_PACKAGE/$1" "${@:2}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for package in $(find_test_dirs); do
|
||||
go test -race -cover -coverprofile="tmp.out" "${KUBE_GO_PACKAGE}/${package}"
|
||||
go test -race -cover -coverprofile="tmp.out" "${KUBE_GO_PACKAGE}/${package}" "${@:2}"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user