Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,4 @@ jobs:
E2E_LABEL_FILTER: ${{ matrix.suite.label-filter }}
LOAD_VLLM_RENDER_IMAGE: ${{ matrix.suite.needs-renderer }}
PULL_VLLM_RENDER_IMAGE: "false"
run: make test-e2e-scheduler-run
run: make test-e2e-router-run
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -304,24 +304,24 @@ test-e2e-gaie-run: image-pull ## Ensure images are present, then run GAIE e2e te
$(CONTAINER_RUNTIME) run $(BUILDER_RUN_FLAGS) $(BUILDER_E2E_FLAGS) \
-e EPP_IMAGE=$(GAIE_E2E_IMAGE) \
-e USE_KIND=true \
$(BUILDER_IMAGE) ./hack/test-e2e.sh
$(BUILDER_IMAGE) ./test/scripts/test-e2e-gaie.sh

.PHONY: test-e2e-gaie
test-e2e-gaie: image-build-builder image-build ## Build images and run GAIE e2e tests
$(MAKE) test-e2e-gaie-run

.PHONY: test-e2e-scheduler-run
test-e2e-scheduler-run: image-pull ## Ensure images are present, then run scheduler e2e tests
.PHONY: test-e2e-router-run
test-e2e-router-run: image-pull ## Ensure images are present, then run router e2e tests
@printf "\033[33;1m==== Running End to End Tests ====\033[0m\n"
$(CONTAINER_RUNTIME) run $(BUILDER_RUN_FLAGS) $(BUILDER_E2E_FLAGS) \
$(BUILDER_IMAGE) ./test/scripts/run_e2e.sh
$(BUILDER_IMAGE) ./test/scripts/test-e2e-router.sh

.PHONY: test-e2e-scheduler
test-e2e-scheduler: image-build-builder image-build ## Build images and run scheduler e2e tests
$(MAKE) test-e2e-scheduler-run
.PHONY: test-e2e-router
test-e2e-router: image-build-builder image-build ## Build images and run router e2e tests
$(MAKE) test-e2e-router-run

.PHONY: test-e2e
test-e2e: test-e2e-gaie test-e2e-scheduler ## Run all end-to-end tests sequentially
test-e2e: test-e2e-gaie test-e2e-router ## Run all end-to-end tests sequentially


.PHONY: bench-tokenizer
Expand Down
42 changes: 42 additions & 0 deletions test/scripts/e2e-common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2026 The llm-d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Shared helpers for the e2e runner scripts. Source, do not execute.

# e2e_handle_interrupt deletes the named kind cluster on Ctrl-C and exits 130.
# An empty cluster name means there is nothing to delete (the caller did not
# create a cluster it owns). E2E_KEEP_CLUSTER_ON_FAILURE=true keeps the cluster.
e2e_handle_interrupt() {
local cluster="$1"
echo "Interrupted!"
if [ -n "${cluster}" ] && [ "${E2E_KEEP_CLUSTER_ON_FAILURE:-false}" != "true" ]; then
echo "Deleting kind cluster '${cluster}'"
kind delete cluster --name "${cluster}" 2>/dev/null || true
elif [ -n "${cluster}" ]; then
echo "Keeping kind cluster '${cluster}' (E2E_KEEP_CLUSTER_ON_FAILURE=true)"
fi
exit 130 # SIGINT (Ctrl+C)
}

# run_ginkgo_suite runs the Ginkgo e2e suite in the given package directory,
# applying E2E_LABEL_FILTER when set.
run_ginkgo_suite() {
local pkg="$1"
if [ -n "${E2E_LABEL_FILTER:-}" ]; then
echo "Label filter: ${E2E_LABEL_FILTER}"
go test -v -timeout 45m "${pkg}" -ginkgo.v -ginkgo.fail-fast "-ginkgo.label-filter=${E2E_LABEL_FILTER}"
else
go test -v -timeout 45m "${pkg}" -ginkgo.v -ginkgo.fail-fast
fi
}
29 changes: 0 additions & 29 deletions test/scripts/run_e2e.sh

This file was deleted.

28 changes: 9 additions & 19 deletions hack/test-e2e.sh → test/scripts/test-e2e-gaie.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ set -euox pipefail

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# shellcheck source=test/scripts/e2e-common.sh
source "${DIR}/e2e-common.sh"

EPP_IMAGE="${EPP_IMAGE:-ghcr.io/llm-d/llm-d-router-endpoint-picker:dev}"
SIM_IMAGE="${VLLM_IMAGE:-ghcr.io/llm-d/llm-d-inference-sim:v0.9.2}"
MANIFEST_PATH="${MANIFEST_PATH:-${DIR}/../test/testdata/sim-deployment.yaml}"
MANIFEST_PATH="${MANIFEST_PATH:-${DIR}/../testdata/sim-deployment.yaml}"
USE_KIND="${USE_KIND:-true}"
KIND_NODE_IMAGE="${KIND_NODE_IMAGE:-mirror.gcr.io/kindest/node:v1.32.2}"

Expand Down Expand Up @@ -48,18 +51,11 @@ load_images() {
CLUSTER_NAME="${cluster}" ./scripts/load_image.sh "${EPP_IMAGE}" "${SIM_IMAGE}"
}

cleanup() {
echo "Interrupted!"
if [ -n "${CREATED_CLUSTER}" ] && [ "${E2E_KEEP_CLUSTER_ON_FAILURE:-false}" != "true" ]; then
echo "Deleting kind cluster '${CREATED_CLUSTER}'"
kind delete cluster --name "${CREATED_CLUSTER}" 2>/dev/null || true
fi
exit 130 # SIGINT (Ctrl+C)
}

# Normally kind cluster cleanup is done by AfterSuite; this trap only fires on
# interruption signals so that a Ctrl+C still cleans up the cluster we created.
trap cleanup INT TERM
# CREATED_CLUSTER is empty until we create a cluster ourselves, so an interrupt
# before then deletes nothing.
trap 'e2e_handle_interrupt "${CREATED_CLUSTER}"' INT TERM

if [ "${USE_KIND}" = "true" ]; then
install_kind
Expand Down Expand Up @@ -92,11 +88,5 @@ else
fi

echo "Running Go e2e tests in ./test/e2e/epp/..."
if [ -n "${E2E_LABEL_FILTER:-}" ]; then
echo "Label filter: ${E2E_LABEL_FILTER}"
MANIFEST_PATH="${MANIFEST_PATH}" E2E_IMAGE="${EPP_IMAGE}" \
go test "${DIR}/../test/e2e/epp/" -v -timeout 45m -ginkgo.v -ginkgo.fail-fast "-ginkgo.label-filter=${E2E_LABEL_FILTER}"
else
MANIFEST_PATH="${MANIFEST_PATH}" E2E_IMAGE="${EPP_IMAGE}" \
go test "${DIR}/../test/e2e/epp/" -v -timeout 45m -ginkgo.v -ginkgo.fail-fast
fi
export MANIFEST_PATH E2E_IMAGE="${EPP_IMAGE}"
run_ginkgo_suite "${DIR}/../e2e/epp/"
34 changes: 34 additions & 0 deletions test/scripts/test-e2e-router.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

# Copyright 2026 The llm-d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# shellcheck source=test/scripts/e2e-common.sh
source "${DIR}/e2e-common.sh"

# Set trap only for interruption signals.
# Normally kind cluster cleanup is done by AfterSuite; this trap deletes the
# e2e-tests cluster on Ctrl-C. The delete is unconditional and only meaningful
# when the suite created that cluster (K8S_CONTEXT unset); when running against
# an existing context it is a no-op unless a cluster named e2e-tests happens to
# exist.
trap 'e2e_handle_interrupt "e2e-tests"' INT TERM

echo "Running end to end tests"

run_ginkgo_suite "${DIR}/../e2e/"
Loading