mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-22 07:03:28 +00:00
Merge pull request #133588 from pohly/test-integration-timeout
hack: more output about running tests
This commit is contained in:
@@ -169,3 +169,13 @@ kube::log::status() {
|
||||
echo " ${message}"
|
||||
done
|
||||
}
|
||||
|
||||
# Log a command and run it. Uses a subshell which gets replaced by the command after logging.
|
||||
kube::log::run() (
|
||||
V="${V:-0}"
|
||||
if (( KUBE_VERBOSE >= V )); then
|
||||
timestamp=$(date +"[%m%d %H:%M:%S]")
|
||||
echo "+++ ${timestamp} ${*}"
|
||||
fi
|
||||
exec "${@}"
|
||||
)
|
||||
|
||||
@@ -25,6 +25,8 @@ kube::golang::setup_env
|
||||
kube::golang::setup_gomaxprocs
|
||||
kube::util::require-jq
|
||||
|
||||
set -x
|
||||
|
||||
# start the cache mutation detector by default so that cache mutators will be found
|
||||
KUBE_CACHE_MUTATION_DETECTOR="${KUBE_CACHE_MUTATION_DETECTOR:-true}"
|
||||
export KUBE_CACHE_MUTATION_DETECTOR
|
||||
@@ -47,6 +49,8 @@ KUBE_TEST_ARGS=${KUBE_TEST_ARGS:-}
|
||||
# Default glog module settings.
|
||||
KUBE_TEST_VMODULE=${KUBE_TEST_VMODULE:-""}
|
||||
|
||||
set +x
|
||||
|
||||
kube::test::find_integration_test_pkgs() {
|
||||
(
|
||||
cd "${KUBE_ROOT}"
|
||||
|
||||
@@ -57,6 +57,8 @@ kube::test::find_go_packages() {
|
||||
)
|
||||
}
|
||||
|
||||
set -x
|
||||
|
||||
# TODO: This timeout should really be lower, this is a *long* time to test one
|
||||
# package, however pkg/api/testing in particular will fail with a lower timeout
|
||||
# currently. We should attempt to lower this over time.
|
||||
@@ -85,6 +87,8 @@ KUBE_KEEP_VERBOSE_TEST_OUTPUT=${KUBE_KEEP_VERBOSE_TEST_OUTPUT:-n}
|
||||
# Set to 'false' to disable reduction of the JUnit file to only the top level tests.
|
||||
KUBE_PRUNE_JUNIT_TESTS=${KUBE_PRUNE_JUNIT_TESTS:-true}
|
||||
|
||||
set +x
|
||||
|
||||
kube::test::usage() {
|
||||
kube::log::usage_from_stdin <<EOF
|
||||
usage: $0 [OPTIONS] [TARGETS]
|
||||
@@ -225,7 +229,7 @@ runTests() {
|
||||
fi
|
||||
|
||||
kube::log::status "Running tests ${cover_msg} ${KUBE_RACE:+"and with ${KUBE_RACE}"}"
|
||||
gotestsum --format="${gotestsum_format}" \
|
||||
kube::log::run gotestsum --format="${gotestsum_format}" \
|
||||
--jsonfile="${jsonfile}" \
|
||||
--junitfile="${junit_filename_prefix:+"${junit_filename_prefix}.xml"}" \
|
||||
--raw-command \
|
||||
|
||||
Reference in New Issue
Block a user