mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #952 from smarterclayton/let_timeout_be_overriden
Let coverage and timeout be overriden in hack/test-go.sh
This commit is contained in:
commit
6c9fda472d
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user