11CI ?= false
22CLUSTER_NAME ?= kind
33CONFORMANCE_PREFIX = conformance-test-runner# # Prefix for the conformance test runner image
4+ CONFORMANCE_INFERENCE_PREFIX = conformance-inference-test-runner# # Prefix for the conformance test runner image
45CONFORMANCE_TAG = latest# # Tag for the conformance test runner image
56GATEWAY_CLASS = nginx# # Gateway class to use
67GINKGO_FLAGS =
@@ -46,6 +47,10 @@ update-go-modules: ## Update the gateway-api go modules to latest main version
4647build-test-runner-image : # # Build conformance test runner image
4748 docker build --platform $(GOOS ) /$(GOARCH ) -t $(CONFORMANCE_PREFIX ) :$(CONFORMANCE_TAG ) -f conformance/Dockerfile .
4849
50+ .PHONY : build-test-runner-image-for-inference
51+ build-test-runner-image-for-inference : # # Build conformance test runner image for inference extension
52+ docker build --platform $(GOOS ) /$(GOARCH ) -t $(CONFORMANCE_INFERENCE_PREFIX ) :$(CONFORMANCE_TAG ) -f conformance/Dockerfile .
53+
4954.PHONY : build-crossplane-image
5055build-crossplane-image : # # Build the crossplane image
5156 docker build --platform $(GOOS ) /$(GOARCH ) --build-arg NGINX_CONF_DIR=$(NGINX_CONF_DIR ) -t nginx-crossplane:latest -f framework/crossplane/Dockerfile ..
@@ -60,7 +65,7 @@ run-conformance-tests: ## Run conformance tests
6065 --restart=Never -- sh -c " go test -v . -tags conformance,experimental -args --gateway-class=$( GATEWAY_CLASS) \
6166 --supported-features=$(SUPPORTED_EXTENDED_FEATURES ) --version=$(NGF_VERSION ) --skip-tests=$(SKIP_TESTS ) --conformance-profiles=$(CONFORMANCE_PROFILES ) \
6267 --report-output=output.txt; cat output.txt" | tee output.txt
63- ./scripts/check-pod-exit-code.sh
68+ ./scripts/check-pod-exit-code.sh conformance
6469 sed -e ' 1,/CONFORMANCE PROFILE/d' output.txt > conformance-profile.yaml
6570 grpc_core_result=` yq ' .profiles[0].core.result' conformance-profile.yaml` ; \
6671 http_core_result=` yq ' .profiles[1].core.result' conformance-profile.yaml` ; \
@@ -80,7 +85,7 @@ run-conformance-tests-openshift: ## Run conformance tests on OpenShift (skips te
8085 --restart=Never -- sh -c " go test -v . -tags conformance,experimental -args --gateway-class=$( GATEWAY_CLASS) \
8186 --supported-features=$(SUPPORTED_EXTENDED_FEATURES_OPENSHIFT ) --version=$(NGF_VERSION ) --skip-tests=$(SKIP_TESTS_OPENSHIFT ) --conformance-profiles=$(CONFORMANCE_PROFILES ) \
8287 --service-type=$(GW_SERVICE_TYPE ) --report-output=output.txt; cat output.txt" | tee output.txt
83- ./scripts/check-pod-exit-code.sh
88+ ./scripts/check-pod-exit-code.sh conformance
8489 sed -e ' 1,/CONFORMANCE PROFILE/d' output.txt > conformance-profile.yaml
8590 rm output.txt
8691 grpc_core_result=` yq ' .profiles[0].core.result' conformance-profile.yaml` ; \
@@ -94,18 +99,18 @@ run-conformance-tests-openshift: ## Run conformance tests on OpenShift (skips te
9499
95100.PHONY : run-inference-conformance-tests
96101run-inference-conformance-tests : # # Run inference conformance tests
97- kind load docker-image $(CONFORMANCE_PREFIX ) :$(CONFORMANCE_TAG ) --name $(CLUSTER_NAME )
102+ kind load docker-image $(CONFORMANCE_INFERENCE_PREFIX ) :$(CONFORMANCE_TAG ) --name $(CLUSTER_NAME )
98103 kubectl apply -f conformance/conformance-rbac.yaml
99- kubectl run -i conformance \
100- --image=$(CONFORMANCE_PREFIX ) :$(CONFORMANCE_TAG ) --image-pull-policy=Never \
104+ kubectl run -i conformance-inference \
105+ --image=$(CONFORMANCE_INFERENCE_PREFIX ) :$(CONFORMANCE_TAG ) --image-pull-policy=Never \
101106 --overrides=' { "spec": { "serviceAccountName": "conformance" } }' \
102107 --restart=Never -- sh -c " go test -v . -tags conformance -args --gateway-class=$( GATEWAY_CLASS) \
103108 --version=$(NGF_VERSION ) \
104109 --skip-tests=$(INFERENCE_SKIP_TESTS ) \
105110 --supported-features=$(INFERENCE_SUPPORTED_FEATURES ) \
106111 --report-output=output.txt; cat output.txt" | tee output.txt
107- ./scripts/check-pod-exit-code.sh
108- sed -e ' 1,/CONFORMANCE PROFILE /d' output.txt > conformance-profile-inference.yaml
112+ ./scripts/check-pod-exit-code.sh conformance-inference
113+ sed -e ' 1,/GatewayAPIInferenceExtensionVersion /d' output.txt > conformance-profile-inference.yaml
109114 rm output.txt
110115 core_result=` yq ' .profiles[0].core.result' conformance-profile-inference.yaml` ; \
111116 if [ " $$ core_result" != " failure" ] ; then \
@@ -117,6 +122,12 @@ run-inference-conformance-tests: ## Run inference conformance tests
117122.PHONY : cleanup-conformance-tests
118123cleanup-conformance-tests : # # Clean up conformance tests fixtures
119124 kubectl delete pod conformance
125+ kubectl delete pod conformance-inference
126+ kubectl delete -f conformance/conformance-rbac.yaml
127+
128+ .PHONY : cleanup-conformance-inference-tests
129+ cleanup-conformance-inference-tests : # # Clean up conformance inference tests fixtures
130+ kubectl delete pod conformance-inference
120131 kubectl delete -f conformance/conformance-rbac.yaml
121132
122133.PHONY : reset-go-modules
0 commit comments