run-e2e-tests.sh 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/usr/bin/env bash
  2. # Copyright 2015 The Kubernetes Authors.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. export KUBERNETES_PROVIDER="kubemark"
  16. export KUBE_CONFIG_FILE="config-default.sh"
  17. KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
  18. # We need an absolute path to KUBE_ROOT
  19. ABSOLUTE_ROOT=$(readlink -f "${KUBE_ROOT}")
  20. source "${KUBE_ROOT}/cluster/kubemark/util.sh"
  21. echo "Kubemark master name: ${MASTER_NAME}"
  22. detect-master
  23. export KUBE_MASTER_URL="https://${KUBE_MASTER_IP}"
  24. export KUBECONFIG="${ABSOLUTE_ROOT}/test/kubemark/resources/kubeconfig.kubemark"
  25. export E2E_MIN_STARTUP_PODS=0
  26. if [[ -z "$*" ]]; then
  27. ARGS=('--ginkgo.focus=[Feature:Performance]')
  28. else
  29. ARGS=("$@")
  30. fi
  31. if [[ "${ENABLE_KUBEMARK_CLUSTER_AUTOSCALER}" == "true" ]]; then
  32. ARGS+=("--kubemark-external-kubeconfig=${DEFAULT_KUBECONFIG}")
  33. fi
  34. if [[ -f /.dockerenv ]]; then
  35. # Running inside a dockerized runner.
  36. go run ./hack/e2e.go -- --check-version-skew=false --test --test_args="--e2e-verify-service-account=false --dump-logs-on-failure=false ${ARGS[*]}"
  37. else
  38. # Running locally.
  39. for ((i=0; i < ${ARGS[@]}; i++)); do
  40. ARGS[$i]="$(echo "ARGS[$i]" | sed -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' )"
  41. done
  42. "${KUBE_ROOT}/hack/ginkgo-e2e.sh" "--e2e-verify-service-account=false" "--dump-logs-on-failure=false" "${ARGS[@]}"
  43. fi