Skip to content

Commit

Permalink
Merge pull request #190 from pohly/prow
Browse files Browse the repository at this point in the history
Prow testing: update csi-release-tools, fix reporting
  • Loading branch information
k8s-ci-robot authored Apr 12, 2019
2 parents 6d30464 + 3f5d727 commit c937600
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# deployment) does not pass csi-sanity testing.
: ${CSI_PROW_KUBERNETES_VERSION:=1.14.0}

# This repo supports and wants sanity testing.
CSI_PROW_TESTS_SANITY=sanity

. release-tools/prow.sh

# Here we override "install_sanity" to use the pre-built one.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TEST_GO_FILTER_CMD+=| grep -v /cmd/csi-sanity
.PHONY: test-sanity
test: test-sanity
test-sanity:
@ echo; echo "### test-sanity"
@ echo; echo "### $@:"
./hack/e2e.sh

build-sanity:
Expand Down
22 changes: 15 additions & 7 deletions release-tools/prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,13 @@ configvar CSI_PROW_SANITY_CONTAINER "hostpath" "Kubernetes container with CSI dr
# - serial, only alpha features
# - sanity
#
# Sanity testing with csi-sanity only covers the CSI driver itself and thus
# is off by default. A CSI driver can change that default in its .prow.sh
# by setting CSI_PROW_TESTS_SANITY.
configvar CSI_PROW_TESTS "unit parallel serial parallel-alpha serial-alpha ${CSI_PROW_TESTS_SANITY}" "tests to run"
# Unknown or unsupported entries are ignored.
#
# Sanity testing with csi-sanity only covers the CSI driver itself and
# thus only makes sense in repos which provide their own CSI
# driver. Repos can enable sanity testing by setting
# CSI_PROW_TESTS_SANITY=sanity.
configvar CSI_PROW_TESTS "unit parallel serial parallel-alpha serial-alpha sanity" "tests to run"
tests_enabled () {
local t1 t2
# We want word-splitting here, so ignore: Quote to prevent word splitting, or split robustly with mapfile or read -a.
Expand All @@ -216,11 +219,16 @@ tests_enabled () {
done
return 1
}
sanity_enabled () {
[ "${CSI_PROW_TESTS_SANITY}" = "sanity" ] && tests_enabled "sanity"
}
tests_need_kind () {
tests_enabled "sanity" "parallel" "serial" "serial-alpha" "parallel-alpha"
tests_enabled "parallel" "serial" "serial-alpha" "parallel-alpha" ||
sanity_enabled
}
tests_need_non_alpha_cluster () {
tests_enabled "sanity" "parallel" "serial"
tests_enabled "parallel" "serial" ||
sanity_enabled
}
tests_need_alpha_cluster () {
tests_enabled "parallel-alpha" "serial-alpha"
Expand Down Expand Up @@ -916,7 +924,7 @@ main () {
if install_hostpath "$images"; then
collect_cluster_info
if tests_enabled "sanity"; then
if sanity_enabled; then
if ! run_sanity; then
ret=1
fi
Expand Down

0 comments on commit c937600

Please sign in to comment.