mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
enable debug mode of E2E tests
This commit is contained in:
parent
1db614ec8f
commit
f301e3189a
@ -41,6 +41,13 @@ GINKGO_NO_COLOR=${GINKGO_NO_COLOR:-n}
|
|||||||
# If 'y', will rerun failed tests once to give them a second chance.
|
# If 'y', will rerun failed tests once to give them a second chance.
|
||||||
GINKGO_TOLERATE_FLAKES=${GINKGO_TOLERATE_FLAKES:-n}
|
GINKGO_TOLERATE_FLAKES=${GINKGO_TOLERATE_FLAKES:-n}
|
||||||
|
|
||||||
|
# If set, the command executed will be:
|
||||||
|
# - `dlv exec` if set to "delve"
|
||||||
|
# - `gdb` if set to "gdb"
|
||||||
|
# NOTE: for this to work the e2e.test binary has to be compiled with
|
||||||
|
# make WHAT=test/e2e/e2e.test GOGCFLAGS="all=-N -l" GOLDFLAGS=""
|
||||||
|
E2E_TEST_DEBUG_TOOL=${E2E_TEST_DEBUG_TOOL:-}
|
||||||
|
|
||||||
: "${KUBECTL:="${KUBE_ROOT}/cluster/kubectl.sh"}"
|
: "${KUBECTL:="${KUBE_ROOT}/cluster/kubectl.sh"}"
|
||||||
: "${KUBE_CONFIG_FILE:="config-test.sh"}"
|
: "${KUBE_CONFIG_FILE:="config-test.sh"}"
|
||||||
|
|
||||||
@ -152,7 +159,20 @@ CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-${KUBE_CONTAINER_RUNTIME:-}}
|
|||||||
# Add path for things like running kubectl binary.
|
# Add path for things like running kubectl binary.
|
||||||
PATH=$(dirname "${e2e_test}"):"${PATH}"
|
PATH=$(dirname "${e2e_test}"):"${PATH}"
|
||||||
export PATH
|
export PATH
|
||||||
"${ginkgo}" "${ginkgo_args[@]:+${ginkgo_args[@]}}" "${e2e_test}" -- \
|
|
||||||
|
# Choose the program to execute.
|
||||||
|
program="${ginkgo}"
|
||||||
|
program_args="${ginkgo_args[@]}"
|
||||||
|
if [[ "${E2E_TEST_DEBUG_TOOL}" == "delve" ]]; then
|
||||||
|
program="dlv"
|
||||||
|
program_args=("exec")
|
||||||
|
fi
|
||||||
|
if [[ "${E2E_TEST_DEBUG_TOOL}" == "gdb" ]]; then
|
||||||
|
program="gdb"
|
||||||
|
program_args=("")
|
||||||
|
fi
|
||||||
|
|
||||||
|
"${program}" "${program_args[@]:+${program_args[@]}}" "${e2e_test}" -- \
|
||||||
"${auth_config[@]:+${auth_config[@]}}" \
|
"${auth_config[@]:+${auth_config[@]}}" \
|
||||||
--ginkgo.flakeAttempts="${FLAKE_ATTEMPTS}" \
|
--ginkgo.flakeAttempts="${FLAKE_ATTEMPTS}" \
|
||||||
--host="${KUBE_MASTER_URL}" \
|
--host="${KUBE_MASTER_URL}" \
|
||||||
|
Loading…
Reference in New Issue
Block a user