Commit 31dfaf31 by Patrick Ohly

prow.sh: fix running of just "alpha" tests

"grep -w" treated "serial-alpha" as two words and therefore CSI_PROW_TESTS sometimes ran too many tests.
parent f5014439
...@@ -203,7 +203,16 @@ configvar CSI_PROW_SANITY_CONTAINER "hostpath" "Kubernetes container with CSI dr ...@@ -203,7 +203,16 @@ configvar CSI_PROW_SANITY_CONTAINER "hostpath" "Kubernetes container with CSI dr
# by setting CSI_PROW_TESTS_SANITY. # by setting CSI_PROW_TESTS_SANITY.
configvar CSI_PROW_TESTS "unit parallel serial parallel-alpha serial-alpha ${CSI_PROW_TESTS_SANITY}" "tests to run" configvar CSI_PROW_TESTS "unit parallel serial parallel-alpha serial-alpha ${CSI_PROW_TESTS_SANITY}" "tests to run"
test_enabled () { test_enabled () {
echo "${CSI_PROW_TESTS}" | grep -q -w -e "$1" local test="$1"
# We want word-splitting here, so ignore: Double quote to prevent globbing and word splitting.
# shellcheck disable=SC2086
set ${CSI_PROW_TESTS}
for t in "$@"; do
if [ "$t" = "$test" ]; then
return
fi
done
return 1
} }
# Serial vs. parallel is always determined by these regular expressions. # Serial vs. parallel is always determined by these regular expressions.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment