choose a particular directory test-integration

This commit is contained in:
deads2k
2016-08-26 12:33:06 -04:00
parent 6eb279ee6e
commit 5c9df6655c
3 changed files with 16 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ KUBE_TEST_ARGS=${KUBE_TEST_ARGS:-}
kube::test::find_integration_test_dirs() {
(
cd ${KUBE_ROOT}
find test/integration -name '*_test.go' -print0 \
find test/integration/${1-} -name '*_test.go' -print0 \
| xargs -0n1 dirname \
| sort -u
)
@@ -60,7 +60,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 | paste -sd' ' -)" \
WHAT="$(kube::test::find_integration_test_dirs ${2-} | paste -sd' ' -)" \
KUBE_GOFLAGS="${KUBE_GOFLAGS:-} -tags 'integration no-docker'" \
KUBE_RACE="" \
KUBE_TIMEOUT="${KUBE_TIMEOUT}" \
@@ -90,5 +90,5 @@ 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}"
runTests "${apiVersion}" "${1-}"
done