From 8b06cd8e011215ece263a6c8913b29f19fb9c5d4 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sat, 5 Jul 2014 16:33:49 -0400 Subject: [PATCH] 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 --- hack/test-go.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/test-go.sh b/hack/test-go.sh index 2755c829637..f104317c4ed 100755 --- a/hack/test-go.sh +++ b/hack/test-go.sh @@ -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