diff --git a/hack/make/.integration-test-helpers b/hack/make/.integration-test-helpers index 169ff0c701..8dfae12957 100644 --- a/hack/make/.integration-test-helpers +++ b/hack/make/.integration-test-helpers @@ -14,6 +14,7 @@ source "${MAKEDIR}/.go-autogen" # Set defaults : "${TEST_REPEAT:=1}" +: "${TIMEOUT:=5m}" : "${TESTFLAGS:=}" : "${TESTDEBUG:=}" : "${TESTCOVERAGE:=}" @@ -54,7 +55,7 @@ else fi run_test_integration() { - set_platform_timeout + set_repeat_timeout local failed=0 if [ -z "${TEST_SKIP_INTEGRATION}" ]; then if ! run_test_integration_suites "${integration_api_dirs}"; then @@ -181,7 +182,6 @@ test_env() { DOCKER_INTEGRATION_DAEMON_DEST="$DOCKER_INTEGRATION_DAEMON_DEST" \ DOCKER_TLS_VERIFY="$DOCKER_TEST_TLS_VERIFY" \ DOCKER_CERT_PATH="$DOCKER_TEST_CERT_PATH" \ - DOCKER_ENGINE_GOARCH="$DOCKER_ENGINE_GOARCH" \ DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" \ DOCKER_USERLANDPROXY="$DOCKER_USERLANDPROXY" \ DOCKER_HOST="$DOCKER_HOST" \ @@ -201,16 +201,7 @@ test_env() { ) } -set_platform_timeout() { - # Test timeout. - if [ "${DOCKER_ENGINE_GOARCH}" = "arm64" ] || [ "${DOCKER_ENGINE_GOARCH}" = "arm" ]; then - : "${TIMEOUT:=10m}" - elif [ "${DOCKER_ENGINE_GOARCH}" = "windows" ]; then - : "${TIMEOUT:=8m}" - else - : "${TIMEOUT:=5m}" - fi - +set_repeat_timeout() { if [ "${TEST_REPEAT}" -gt 1 ]; then # TIMEOUT needs to take TEST_REPEAT into account, or a premature time out may happen. # The following ugliness will: diff --git a/hack/test/e2e-run.sh b/hack/test/e2e-run.sh index 5e4d8f2154..37b25db2d4 100755 --- a/hack/test/e2e-run.sh +++ b/hack/test/e2e-run.sh @@ -1,13 +1,6 @@ #!/usr/bin/env bash set -e -u -o pipefail -ARCH=$(uname -m) -if [ "$ARCH" = "x86_64" ]; then - ARCH="amd64" -fi - -export DOCKER_ENGINE_GOARCH=${DOCKER_ENGINE_GOARCH:-${ARCH}} - # Set defaults : ${TESTFLAGS:=} : ${TESTDEBUG:=} @@ -18,13 +11,12 @@ integration_api_dirs=${TEST_INTEGRATION_DIR:-"$( )"} run_test_integration() { - set_platform_timeout run_test_integration_suites run_test_integration_legacy_suites } run_test_integration_suites() { - local flags="-test.v -test.timeout=${TIMEOUT:-10m} $TESTFLAGS" + local flags="-test.v -test.timeout=${TIMEOUT} $TESTFLAGS" for dir in $integration_api_dirs; do if ! ( cd $dir @@ -53,7 +45,6 @@ test_env() { DOCKER_INTEGRATION_DAEMON_DEST="$DOCKER_INTEGRATION_DAEMON_DEST" \ DOCKER_TLS_VERIFY="$DOCKER_TEST_TLS_VERIFY" \ DOCKER_CERT_PATH="$DOCKER_TEST_CERT_PATH" \ - DOCKER_ENGINE_GOARCH="$DOCKER_ENGINE_GOARCH" \ DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" \ DOCKER_USERLANDPROXY="$DOCKER_USERLANDPROXY" \ DOCKER_HOST="$DOCKER_HOST" \ @@ -69,16 +60,5 @@ test_env() { ) } -set_platform_timeout() { - # Test timeout. - if [ "${DOCKER_ENGINE_GOARCH}" = "arm64" ] || [ "${DOCKER_ENGINE_GOARCH}" = "arm" ]; then - : ${TIMEOUT:=10m} - elif [ "${DOCKER_ENGINE_GOARCH}" = "windows" ]; then - : ${TIMEOUT:=8m} - else - : ${TIMEOUT:=5m} - fi -} - sh /scripts/build-empty-images.sh run_test_integration