|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# Copyright 2025 The Kubernetes Authors. |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | + |
| 17 | +set -o errexit |
| 18 | +set -o nounset |
| 19 | +set -o pipefail |
| 20 | + |
| 21 | +SOURCE_DIR="$(cd "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" |
| 22 | +ROOT_DIR="$SOURCE_DIR/.." |
| 23 | + |
| 24 | +GINKGO="$ROOT_DIR"/bin/ginkgo |
| 25 | +GINKGO_ARGS=${GINKGO_ARGS:-} |
| 26 | + |
| 27 | +# Check if ginkgo binary is present |
| 28 | +if [ ! -f "$GINKGO" ]; then |
| 29 | + echo "ginkgo binary not found at $GINKGO, building it" |
| 30 | + make ginkgo |
| 31 | +fi |
| 32 | + |
| 33 | +HELM_CHART=$ROOT_DIR/deployments/helm/nvidia-dra-driver-gpu |
| 34 | +E2E_IMAGE_REPO=${E2E_IMAGE_REPO:-"ghcr.io/nvidia/k8s-dra-driver-gpu"} |
| 35 | +E2E_IMAGE_TAG=${E2E_IMAGE_TAG:-"93cd4799-ubi9"} |
| 36 | +E2E_IMAGE_PULL_POLICY=${E2E_IMAGE_PULL_POLICY:-"IfNotPresent"} |
| 37 | +ENABLE_GFD=${ENABLE_GFD:-"true"} |
| 38 | +E2E_HOST_MANAGED_DRIVERS=${E2E_HOST_MANAGED_DRIVERS:-"true"} |
| 39 | + |
| 40 | +export E2E_IMAGE_REPO HELM_CHART E2E_IMAGE_TAG E2E_IMAGE_PULL_POLICY ENABLE_GFD E2E_HOST_MANAGED_DRIVERS |
| 41 | + |
| 42 | +# shellcheck disable=SC2086 |
| 43 | +$GINKGO $GINKGO_ARGS -v --json-report ginkgo.json ./tests/e2e/... |
0 commit comments