From 98f5c362ff11ade66788f47630b9c9b4abacd704 Mon Sep 17 00:00:00 2001 From: Maru Newby Date: Thu, 16 Feb 2017 10:53:58 -0800 Subject: [PATCH] test-federation.sh: Make use of WHAT consistent with make test test-integration.sh was using the first positional arg passed to WHAT to filter the list of integration test packages. This change switches to passing WHAT verbatim to be consistent with how make test works. --- hack/make-rules/test-integration.sh | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) 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