Skip to content

Commit f3adf49

Browse files
committed
hack/ginkgo-e2e.sh: skip S character by default, add newlines in CI
We typically have plenty of skipped tests in an E2E run, which causes Ginkgo to print many S characters (one for each skipped test). This easily fills up an entire console window. Now the default is to silence that output. GINKGO_SILENCE_SKIPS=n reverts to the previous behavior. By default, Ginkgo prints all progress characters (S and o) in a single line. Buffering in Prow causes that output to occur only after the run is over, which defeats the purpose of having those characters. Now a newline is added after each character, so there is visible progress in Prow while Ginkgo runs.
1 parent 37e2dd6 commit f3adf49

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

hack/ginkgo-e2e.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ e2e_test=$(kube::util::find-binary "e2e.test")
3232
# --- Setup some env vars.
3333

3434
GINKGO_PARALLEL=${GINKGO_PARALLEL:-n} # set to 'y' to run tests in parallel
35+
GINKGO_SILENCE_SKIPS=${GINKGO_SILENCE_SKIPS:-y} # set to 'n' to see S character for each skipped test
36+
GINKGO_FORCE_NEWLINES=${GINKGO_FORCE_NEWLINES:-$( if [ "${CI:-false}" = "true" ]; then echo "y"; else echo "n"; fi )} # set to 'y' to print a newline after each S or o character
3537
CLOUD_CONFIG=${CLOUD_CONFIG:-""}
3638

39+
3740
# If 'y', Ginkgo's reporter will not use escape sequence to color output.
3841
#
3942
# Since Kubernetes 1.25, the default is to use colors only when connected to
@@ -158,6 +161,14 @@ if [[ "${GINKGO_TOLERATE_FLAKES}" == "y" ]]; then
158161
fi
159162
ginkgo_args+=("--flake-attempts=${FLAKE_ATTEMPTS}")
160163

164+
if [[ "${GINKGO_SILENCE_SKIPS}" == "y" ]]; then
165+
ginkgo_args+=("--silence-skips")
166+
fi
167+
168+
if [[ "${GINKGO_FORCE_NEWLINES}" == "y" ]]; then
169+
ginkgo_args+=("--force-newlines")
170+
fi
171+
161172
if [[ "${GINKGO_NO_COLOR}" == "y" ]]; then
162173
ginkgo_args+=("--no-color")
163174
fi

0 commit comments

Comments
 (0)