mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #123393 from cblecker/fix-make
Fix makefile variable expansion for test-integration target
This commit is contained in:
commit
18a49b6c56
@ -197,10 +197,12 @@ define TEST_IT_HELP_INFO
|
|||||||
# Args:
|
# Args:
|
||||||
# WHAT: Directory names to test. All *_test.go files under these
|
# WHAT: Directory names to test. All *_test.go files under these
|
||||||
# directories will be run. If not specified, "everything" will be tested.
|
# directories will be run. If not specified, "everything" will be tested.
|
||||||
|
# KUBE_TEST_ARGS: Arguments to pass to the resulting go test invocation.
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# make test-integration
|
# make test-integration
|
||||||
# make test-integration WHAT=./test/integration/kubelet GOFLAGS="-v -coverpkg=./pkg/kubelet/..." KUBE_COVER="y"
|
# make test-integration WHAT=./test/integration/kubelet GOFLAGS="-v -coverpkg=./pkg/kubelet/..." KUBE_COVER="y"
|
||||||
|
# make test-integration WHAT=./test/integration/pods GOFLAGS="-v" KUBE_TEST_ARGS='-run ^TestPodUpdateActiveDeadlineSeconds$$'
|
||||||
endef
|
endef
|
||||||
.PHONY: test-integration
|
.PHONY: test-integration
|
||||||
ifeq ($(PRINT_HELP),y)
|
ifeq ($(PRINT_HELP),y)
|
||||||
@ -208,7 +210,8 @@ test-integration:
|
|||||||
echo "$$TEST_IT_HELP_INFO"
|
echo "$$TEST_IT_HELP_INFO"
|
||||||
else
|
else
|
||||||
test-integration:
|
test-integration:
|
||||||
hack/make-rules/test-integration.sh $(WHAT)
|
# KUBE_TEST_ARGS is explicitly passed here in order to ensure that we are preserving any dollar signs in the value.
|
||||||
|
KUBE_TEST_ARGS='$(value KUBE_TEST_ARGS)' hack/make-rules/test-integration.sh $(WHAT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define TEST_E2E_NODE_HELP_INFO
|
define TEST_E2E_NODE_HELP_INFO
|
||||||
|
@ -75,12 +75,16 @@ runTests() {
|
|||||||
kube::etcd::start_scraping
|
kube::etcd::start_scraping
|
||||||
kube::log::status "Running integration test cases"
|
kube::log::status "Running integration test cases"
|
||||||
|
|
||||||
make -C "${KUBE_ROOT}" test \
|
# shellcheck disable=SC2034
|
||||||
|
# KUBE_RACE and MAKEFLAGS are used in the downstream make, and we set them to
|
||||||
|
# empty here to ensure that we aren't unintentionally consuming them from the
|
||||||
|
# previous make invocation.
|
||||||
|
KUBE_TEST_ARGS="${SHORT:--short=true} --vmodule=${KUBE_TEST_VMODULE} ${KUBE_TEST_ARGS}" \
|
||||||
WHAT="${WHAT:-$(kube::test::find_integration_test_dirs | paste -sd' ' -)}" \
|
WHAT="${WHAT:-$(kube::test::find_integration_test_dirs | paste -sd' ' -)}" \
|
||||||
GOFLAGS="${GOFLAGS:-}" \
|
GOFLAGS="${GOFLAGS:-}" \
|
||||||
KUBE_TEST_ARGS="${SHORT:--short=true} --vmodule=${KUBE_TEST_VMODULE} ${KUBE_TEST_ARGS:-}" \
|
KUBE_RACE="" \
|
||||||
KUBE_TIMEOUT="${KUBE_TIMEOUT}" \
|
MAKEFLAGS="" \
|
||||||
KUBE_RACE=""
|
make -C "${KUBE_ROOT}" test
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user