Skip to content

Commit

Permalink
Merge pull request kubevirt#612 from rmohr/ginkgo
Browse files Browse the repository at this point in the history
Fix ginkgo bootstrap generator
  • Loading branch information
rmohr authored Dec 13, 2017
2 parents b7af8a6 + c9334fd commit 5de91f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cluster/kubectl.sh --init

# Make sure we can connect to kubernetes
export APISERVER=$(cat cluster/vagrant/.kubeconfig | grep server | sed -e 's# \+server: https://##' | sed -e 's/\r//')
$WORKSPACE/dockerize -wait tcp://$APISERVER -timeout 120s
$WORKSPACE/dockerize -wait tcp://$APISERVER -timeout 300s
# Make sure we don't try to talk to Vagrant host via a proxy
export no_proxy="${APISERVER%:*}"

Expand Down
13 changes: 5 additions & 8 deletions hack/bootstrap-ginkgo.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
DIRS=$(find pkg/*/ -type d)
for dir in $DIRS; do
# Let's make sure we don't break build by bootstrapping tests in empty
# directories.
GOFILES=$(find $dir -maxdepth 1 -type f -name *_test.go | wc -l | xargs)
if [ "x${GOFILES}" != "x0" ]; then
# Since ginkgo bootstrap doesn't take path, we have to hop in the
# target package first.
# Find every folder containing tests
for dir in `find pkg/ -type f -name '*_test.go' -printf '%h\n' | sort -u`; do
# If there is no file ending with _suite_test.go, bootstrap ginkgo
SUITE_FILE=$(find $dir -maxdepth 1 -type f -name '*_suite_test.go')
if [ -z "$SUITE_FILE" ]; then
(cd $dir && ginkgo bootstrap || :)
fi
done

0 comments on commit 5de91f8

Please sign in to comment.