Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ $(info build is being skipped)
test: check
else
test: build check
endif
endif
test:
hack/test-cmd.sh
hack/test-integration.sh $(GOFLAGS)
Expand Down
20 changes: 15 additions & 5 deletions hack/test-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,32 @@ find_test_dirs() {

# -covermode=atomic becomes default with -race in Go >=1.3
if [ -z ${KUBE_COVER+x} ]; then
KUBE_COVER="" #"-cover -covermode=atomic"
KUBE_COVER=""
fi

OUTPUT_COVERAGE=${OUTPUT_COVERAGE:-""}

if [ -n "${OUTPUT_COVERAGE}" ]; then
if [ -z "${KUBE_RACE}" ]; then
KUBE_RACE="-race"
fi
if [ -z "${KUBE_COVER}" ]; then
KUBE_COVER="-cover -covermode=atomic"
fi
fi
KUBE_TIMEOUT=${KUBE_TIMEOUT:--timeout 45s}

if [ -z ${KUBE_RACE+x} ]; then
KUBE_RACE="" #"-race"
KUBE_RACE=""
fi

KUBE_TIMEOUT=${KUBE_TIMEOUT:--timeout 45s}

if [ "${1-}" != "" ]; then
test_packages="$OS_GO_PACKAGE/$1"
else
test_packages=`find_test_dirs`
fi

OUTPUT_COVERAGE=${OUTPUT_COVERAGE:-""}

export OPENSHIFT_ON_PANIC=crash

if [[ -n "${KUBE_COVER}" && -n "${OUTPUT_COVERAGE}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion hack/test-integration-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ trap cleanup EXIT SIGINT
echo
echo Docker integration test cases ...
echo
KUBE_RACE="${KUBE_RACE:--race}" KUBE_COVER=" " "${OS_ROOT}/hack/test-go.sh" test/integration -tags 'integration docker' "${@:1}"
KUBE_RACE=" " KUBE_COVER=" " "${OS_ROOT}/hack/test-go.sh" test/integration -tags 'integration docker' "${@:1}"
2 changes: 1 addition & 1 deletion hack/test-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ echo
echo Integration test cases ...
echo
# TODO: race is disabled because of origin #731
KUBE_RACE="${KUBE_RACE:-}" KUBE_COVER=" " "${OS_ROOT}/hack/test-go.sh" test/integration -tags 'integration no-docker' "${@:1}"
KUBE_RACE=" " KUBE_COVER=" " "${OS_ROOT}/hack/test-go.sh" test/integration -tags 'integration no-docker' "${@:1}"