run-e2e-tests.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. # Running locally.
  35. for ((i=0; i < ${#ARGS[@]}; i++)); do
  36. ARGS[$i]="$(echo "${ARGS[$i]}" | sed -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' )"
  37. done
  38. "${KUBE_ROOT}/hack/ginkgo-e2e.sh" "--e2e-verify-service-account=false" "--dump-logs-on-failure=false" "${ARGS[@]}"