Commit 823e26dd authored by Davanum Srinivas's avatar Davanum Srinivas

Remove unnecessary wrapper flags

Drop KUBE_GOFLAGS, KUBE_GOGCFLAGS, KUBE_GOLDFLAGS references from the build infrastructure. There are some usages still for KUBE_GOFLAGS, so we should print a deprecation message until all those are fixed. If both KUBE_GOFLAGS and GOFLAGS are just then we just bail out.
parent 41541910
......@@ -46,12 +46,15 @@ GENERATED_FILE_PREFIX := zz_generated.
# Metadata for driving the build lives here.
META_DIR := .make
# Our build flags.
# TODO(thockin): it would be nice to just use the native flags. Can we EOL
# these "wrapper" flags?
KUBE_GOFLAGS := $(GOFLAGS)
KUBE_GOLDFLAGS := $(GOLDFLAGS)
KUBE_GOGCFLAGS = $(GOGCFLAGS)
ifdef KUBE_GOFLAGS
$(info KUBE_GOFLAGS is now deprecated. Please use GOFLAGS instead.)
ifndef GOFLAGS
GOFLAGS := $(KUBE_GOFLAGS)
unexport KUBE_GOFLAGS
else
$(error Both KUBE_GOFLAGS and GOFLAGS are set. Please use just GOFLAGS)
endif
endif
# Extra options for the release or quick-release options:
KUBE_RELEASE_RUN_TESTS := $(KUBE_RELEASE_RUN_TESTS)
......
......@@ -624,9 +624,9 @@ kube::golang::build_binaries() {
# Use eval to preserve embedded quoted strings.
local goflags goldflags gogcflags
eval "goflags=(${KUBE_GOFLAGS:-})"
goldflags="${KUBE_GOLDFLAGS:-} $(kube::version::ldflags)"
gogcflags="${KUBE_GOGCFLAGS:-}"
eval "goflags=(${GOFLAGS:-})"
goldflags="${GOLDFLAGS:-} $(kube::version::ldflags)"
gogcflags="${GOGCFLAGS:-}"
local use_go_build
local -a targets=()
......
......@@ -71,7 +71,7 @@ runTests() {
# KUBE_RACE="-race"
make -C "${KUBE_ROOT}" test \
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_RACE="" \
KUBE_TIMEOUT="${KUBE_TIMEOUT}" \
......
......@@ -168,7 +168,7 @@ done
shift $((OPTIND - 1))
# Use eval to preserve embedded quoted strings.
eval "goflags=(${KUBE_GOFLAGS:-})"
eval "goflags=(${GOFLAGS:-})"
eval "testargs=(${KUBE_TEST_ARGS:-})"
# Used to filter verbose test output.
......
......@@ -29,7 +29,7 @@ make generated_files
go install ./cmd/...
# 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.
targets=()
......
......@@ -28,6 +28,6 @@ echo "The following invocation will run all integration tests: "
echo ' make test-integration'
echo
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
exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment