mirror of https://github.com/k3s-io/k3s
Merge pull request #46923 from dims/nuke-wrapper-go-flags
Automatic merge from submit-queue (batch tested with PRs 47921, 45984, 46829, 46896, 46923) Remove unnecessary wrapper flags **What this PR does / why we need it**: Drop KUBE_GOFLAGS, KUBE_GOGCFLAGS, KUBE_GOLDFLAGS references from the build infrastructure **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #47296 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/6/head
commit
e4af9dccb0
|
@ -46,12 +46,15 @@ GENERATED_FILE_PREFIX := zz_generated.
|
||||||
# Metadata for driving the build lives here.
|
# Metadata for driving the build lives here.
|
||||||
META_DIR := .make
|
META_DIR := .make
|
||||||
|
|
||||||
# Our build flags.
|
ifdef KUBE_GOFLAGS
|
||||||
# TODO(thockin): it would be nice to just use the native flags. Can we EOL
|
$(info KUBE_GOFLAGS is now deprecated. Please use GOFLAGS instead.)
|
||||||
# these "wrapper" flags?
|
ifndef GOFLAGS
|
||||||
KUBE_GOFLAGS := $(GOFLAGS)
|
GOFLAGS := $(KUBE_GOFLAGS)
|
||||||
KUBE_GOLDFLAGS := $(GOLDFLAGS)
|
unexport KUBE_GOFLAGS
|
||||||
KUBE_GOGCFLAGS = $(GOGCFLAGS)
|
else
|
||||||
|
$(error Both KUBE_GOFLAGS and GOFLAGS are set. Please use just GOFLAGS)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Extra options for the release or quick-release options:
|
# Extra options for the release or quick-release options:
|
||||||
KUBE_RELEASE_RUN_TESTS := $(KUBE_RELEASE_RUN_TESTS)
|
KUBE_RELEASE_RUN_TESTS := $(KUBE_RELEASE_RUN_TESTS)
|
||||||
|
|
|
@ -624,9 +624,9 @@ kube::golang::build_binaries() {
|
||||||
|
|
||||||
# Use eval to preserve embedded quoted strings.
|
# Use eval to preserve embedded quoted strings.
|
||||||
local goflags goldflags gogcflags
|
local goflags goldflags gogcflags
|
||||||
eval "goflags=(${KUBE_GOFLAGS:-})"
|
eval "goflags=(${GOFLAGS:-})"
|
||||||
goldflags="${KUBE_GOLDFLAGS:-} $(kube::version::ldflags)"
|
goldflags="${GOLDFLAGS:-} $(kube::version::ldflags)"
|
||||||
gogcflags="${KUBE_GOGCFLAGS:-}"
|
gogcflags="${GOGCFLAGS:-}"
|
||||||
|
|
||||||
local use_go_build
|
local use_go_build
|
||||||
local -a targets=()
|
local -a targets=()
|
||||||
|
|
|
@ -70,7 +70,7 @@ runTests() {
|
||||||
KUBE_RACE="-race"
|
KUBE_RACE="-race"
|
||||||
make -C "${KUBE_ROOT}" test \
|
make -C "${KUBE_ROOT}" test \
|
||||||
WHAT="${WHAT:-$(kube::test::find_integration_test_dirs | paste -sd' ' -)}" \
|
WHAT="${WHAT:-$(kube::test::find_integration_test_dirs | paste -sd' ' -)}" \
|
||||||
KUBE_GOFLAGS="${KUBE_GOFLAGS:-}" \
|
GOFLAGS="${GOFLAGS:-}" \
|
||||||
KUBE_TEST_ARGS="${KUBE_TEST_ARGS:-} ${SHORT:--short=true} --vmodule=garbage*collector*=6 --alsologtostderr=true" \
|
KUBE_TEST_ARGS="${KUBE_TEST_ARGS:-} ${SHORT:--short=true} --vmodule=garbage*collector*=6 --alsologtostderr=true" \
|
||||||
KUBE_RACE="" \
|
KUBE_RACE="" \
|
||||||
KUBE_TIMEOUT="${KUBE_TIMEOUT}" \
|
KUBE_TIMEOUT="${KUBE_TIMEOUT}" \
|
||||||
|
|
|
@ -168,7 +168,7 @@ done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
# Use eval to preserve embedded quoted strings.
|
# Use eval to preserve embedded quoted strings.
|
||||||
eval "goflags=(${KUBE_GOFLAGS:-})"
|
eval "goflags=(${GOFLAGS:-})"
|
||||||
eval "testargs=(${KUBE_TEST_ARGS:-})"
|
eval "testargs=(${KUBE_TEST_ARGS:-})"
|
||||||
|
|
||||||
# Used to filter verbose test output.
|
# Used to filter verbose test output.
|
||||||
|
|
|
@ -36,7 +36,7 @@ fi
|
||||||
go install ./cmd/...
|
go install ./cmd/...
|
||||||
|
|
||||||
# Use eval to preserve embedded quoted strings.
|
# Use eval to preserve embedded quoted strings.
|
||||||
eval "goflags=(${KUBE_GOFLAGS:-})"
|
eval "goflags=(${GOFLAGS:-})"
|
||||||
|
|
||||||
# Filter out arguments that start with "-" and move them to goflags.
|
# Filter out arguments that start with "-" and move them to goflags.
|
||||||
targets=()
|
targets=()
|
||||||
|
|
|
@ -28,6 +28,6 @@ echo "The following invocation will run all integration tests: "
|
||||||
echo ' make test-integration'
|
echo ' make test-integration'
|
||||||
echo
|
echo
|
||||||
echo "The following invocation will run a specific test with the verbose flag set: "
|
echo "The following invocation will run a specific test with the verbose flag set: "
|
||||||
echo ' make test-integration WHAT=./test/integration/pods KUBE_GOFLAGS="-v" KUBE_TEST_ARGS="-run ^TestPodUpdateActiveDeadlineSeconds$"'
|
echo ' make test-integration WHAT=./test/integration/pods GOFLAGS="-v" KUBE_TEST_ARGS="-run ^TestPodUpdateActiveDeadlineSeconds$"'
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue