Skip to content

Commit

Permalink
Merge pull request #3582 from pohly/e2e-k8s-label-filter
Browse files Browse the repository at this point in the history
e2e-k8s.sh: support --ginkgo.label-filter
  • Loading branch information
k8s-ci-robot authored Jun 12, 2024
2 parents 5f89286 + 165e08b commit b6c15be
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions hack/ci/e2e-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ set -o errexit -o nounset -o xtrace
# Settings:
# SKIP: ginkgo skip regex
# FOCUS: ginkgo focus regex
# LABEL_FILTER: ginkgo label query for selecting tests (see "Spec Labels" in https://onsi.github.io/ginkgo/#filtering-specs)
#
# The default is to focus on conformance tests. Serial tests get skipped when
# parallel testing is enabled. Using LABEL_FILTER instead of combining SKIP and
# FOCUS is recommended (more expressive, easier to read than regexp).
#
# GA_ONLY: true - limit to GA APIs/features as much as possible
# false - (default) APIs and features left at defaults
# FEATURE_GATES:
Expand Down Expand Up @@ -237,9 +243,13 @@ run_tests() {
printf '%s' "${fixed_coredns}" | kubectl apply -f -
fi

# ginkgo regexes
# ginkgo regexes and label filter
SKIP="${SKIP:-}"
FOCUS="${FOCUS:-"\\[Conformance\\]"}"
FOCUS="${FOCUS:-}"
LABEL_FILTER="${LABEL_FILTER:-}"
if [ -z "${FOCUS}" ] && [ -z "${LABEL_FILTER}" ]; then
FOCUS="\\[Conformance\\]"
fi
# if we set PARALLEL=true, skip serial tests set --ginkgo-parallel
if [ "${PARALLEL:-false}" = "true" ]; then
export GINKGO_PARALLEL=y
Expand All @@ -262,7 +272,7 @@ run_tests() {
# interrupt
./hack/ginkgo-e2e.sh \
'--provider=skeleton' "--num-nodes=${NUM_NODES}" \
"--ginkgo.focus=${FOCUS}" "--ginkgo.skip=${SKIP}" \
"--ginkgo.focus=${FOCUS}" "--ginkgo.skip=${SKIP}" "--ginkgo.label-filter=${LABEL_FILTER}" \
"--report-dir=${ARTIFACTS}" '--disable-log-dump=true' &
GINKGO_PID=$!
wait "$GINKGO_PID"
Expand Down

0 comments on commit b6c15be

Please sign in to comment.