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. ...@@ -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() { ...@@ -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=()
......
...@@ -71,7 +71,7 @@ runTests() { ...@@ -71,7 +71,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 ...@@ -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.
......
...@@ -29,7 +29,7 @@ make generated_files ...@@ -29,7 +29,7 @@ make generated_files
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: " ...@@ -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
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