From d573d81306ed82f851c3588b6f75ffbf3c319faa Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 19 Aug 2014 01:13:03 -0400 Subject: [PATCH] Let coverage and timeout be overriden in hack/test-go.sh As usual, shell review / test gratefully accepted. Tested on OSX and F20 --- hack/test-go.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hack/test-go.sh b/hack/test-go.sh index 26bb5cb183f..087478f78a2 100755 --- a/hack/test-go.sh +++ b/hack/test-go.sh @@ -36,12 +36,13 @@ find_test_dirs() { } # -covermode=atomic becomes default with -race in Go >=1.3 -KUBE_COVER="-cover -covermode=atomic" +KUBE_COVER=${KUBE_COVER:--cover -covermode=atomic} +KUBE_TIMEOUT=${KUBE_TIMEOUT:--timeout 30s} cd "${KUBE_TARGET}" if [ "$1" != "" ]; then - go test -race -timeout 30s $KUBE_COVER -coverprofile=tmp.out "$KUBE_GO_PACKAGE/$1" "${@:2}" + go test -race $KUBE_TIMEOUT $KUBE_COVER -coverprofile=tmp.out "$KUBE_GO_PACKAGE/$1" "${@:2}" exit 0 fi