diff --git a/hack/make-rules/test-integration.sh b/hack/make-rules/test-integration.sh index 8955f6a3f2f..cd66e72b303 100755 --- a/hack/make-rules/test-integration.sh +++ b/hack/make-rules/test-integration.sh @@ -41,7 +41,7 @@ KUBE_TEST_ARGS=${KUBE_TEST_ARGS:-} kube::test::find_integration_test_dirs() { ( cd ${KUBE_ROOT} - find test/integration/${1-} -name '*_test.go' -print0 \ + find test/integration/ -name '*_test.go' -print0 \ | xargs -0n1 dirname | sed "s|^|${KUBE_GO_PACKAGE}/|" \ | LC_ALL=C sort -u ) @@ -67,7 +67,7 @@ runTests() { # TODO: Re-enable race detection when we switch to a thread-safe etcd client # KUBE_RACE="-race" make -C "${KUBE_ROOT}" test \ - WHAT="$(kube::test::find_integration_test_dirs ${2-} | paste -sd' ' -) $(echo ${@:3})" \ + WHAT="${WHAT:-$(kube::test::find_integration_test_dirs | paste -sd' ' -)}" \ KUBE_GOFLAGS="${KUBE_GOFLAGS:-} -tags 'integration no-docker'" \ KUBE_TEST_ARGS="${KUBE_TEST_ARGS:-} ${SHORT:--short=true} --vmodule=garbage*collector*=6 --alsologtostderr=true" \ KUBE_RACE="" \ @@ -96,20 +96,8 @@ if [[ -n "${KUBE_TEST_ARGS}" ]]; then exit 0 fi -# Pass arguments that begin with "-" and move them to goflags. -what_flags=() -for arg in "$@"; do - if [[ "${arg}" == -* ]]; then - what_flags+=("${arg}") - fi -done -if [[ "${#what_flags[@]}" -eq 0 ]]; then - what_flags='' -fi - - # Convert the CSV to an array of API versions to test IFS=';' read -a apiVersions <<< "${KUBE_TEST_API_VERSIONS}" for apiVersion in "${apiVersions[@]}"; do - runTests "${apiVersion}" "${1-}" "${what_flags[@]}" + runTests "${apiVersion}" done