Commit 98f5c362 authored by Maru Newby's avatar Maru Newby

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.
parent c762057a
......@@ -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
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