mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
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.
This commit is contained in:
parent
c762057a7c
commit
98f5c362ff
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user