Skip to content

Commit

Permalink
add comments to bazel scripts regarding vendor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTheElder committed Nov 13, 2017
1 parent 8d7189b commit 91f4827
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions hack/update-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ TESTINFRA_ROOT=$(git rev-parse --show-toplevel)
TMP_GOPATH=$(mktemp -d)

# no unit tests in vendor
# previously we used godeps which did this, but `dep` does not handle this
# properly yet. some of these tests don't build well. see:
# ref: https://github.com/kubernetes/test-infra/pull/5411
find ${TESTINFRA_ROOT}/vendor/ -name "*_test.go" -delete

"${TESTINFRA_ROOT}/hack/go_install_from_commit.sh" \
Expand Down
5 changes: 4 additions & 1 deletion hack/verify-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ kazel_diff=$("${TMP_GOPATH}/bin/kazel" \
-root="${TESTINFRA_ROOT}")

# check if there are vendor/*_test.go
# previously we used godeps which did this, but `dep` does not handle this
# properly yet. some of these tests don't build well. see:
# ref: https://github.com/kubernetes/test-infra/pull/5411
vendor_tests=$(find ${TESTINFRA_ROOT}/vendor/ -name "*_test.go" | wc -l)

if [[ -n "${gazelle_diff}" || -n "${kazel_diff}" || "${vendor_tests}" -ne "0" ]]; then
echo "${gazelle_diff}"
echo "${kazel_diff}"
echo "number of vendor/*_test.go: ${vendor_tests}"
echo "number of vendor/*_test.go: ${vendor_tests} (want: 0)"
echo
echo "Run ./hack/update-bazel.sh"
exit 1
Expand Down

0 comments on commit 91f4827

Please sign in to comment.