istio.io/tests/tests.mk

49 lines
1.7 KiB
Makefile

# The following flags (in addition to ${V}) can be specified on the command-line, or the environment. This
# is primarily used by the CI systems.
_INTEGRATION_TEST_FLAGS ?= $(INTEGRATION_TEST_FLAGS)
# $(CI) specifies that the test is running in a CI system. This enables CI specific logging.
ifneq ($(CI),)
_INTEGRATION_TEST_FLAGS += --istio.test.ci
_INTEGRATION_TEST_FLAGS += --istio.test.pullpolicy=IfNotPresent
endif
ifeq ($(TEST_ENV),minikube)
_INTEGRATION_TEST_FLAGS += --istio.test.kube.minikube
else ifeq ($(TEST_ENV),minikube-none)
_INTEGRATION_TEST_FLAGS += --istio.test.kube.minikube
else ifeq ($(TEST_ENV),kind)
_INTEGRATION_TEST_FLAGS += --istio.test.kube.minikube
endif
ifneq ($(ARTIFACTS),)
_INTEGRATION_TEST_FLAGS += --istio.test.work_dir=$(ARTIFACTS)
endif
ifneq ($(HUB),)
_INTEGRATION_TEST_FLAGS += --istio.test.hub=$(HUB)
endif
ifneq ($(TAG),)
_INTEGRATION_TEST_FLAGS += --istio.test.tag=$(TAG)
endif
# $(INTEGRATION_TEST_KUBECONFIG) specifies the kube config file to be used. If not specified, then
# ~/.kube/config is used.
# TODO: This probably needs to be more intelligent and take environment variables into account.
ifneq ($(KUBECONFIG),)
_INTEGRATION_TEST_FLAGS += --istio.test.kube.config=$(KUBECONFIG)
else
_INTEGRATION_TEST_FLAGS += --istio.test.kube.config=~/.kube/config
endif
test.kube.presubmit: init
PATH=${PATH}:${ISTIO_OUT} $(GO) test -p 1 ${T} ./tests/... -timeout 30m \
--istio.test.select -postsubmit,-flaky \
--istio.test.env kube \
${_INTEGRATION_TEST_FLAGS} \
2>&1 | tee >($(JUNIT_REPORT) > $(JUNIT_OUT))
test.kube.postsubmit: test.kube.presubmit
SNIPPETS_GCS_PATH="istio-snippets/$(shell git rev-parse HEAD)" prow/upload-istioio-snippets.sh