forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubevirt#612 from rmohr/ginkgo
Fix ginkgo bootstrap generator
- Loading branch information
Showing
2 changed files
with
6 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |