From 8c7e58a231d5aa3dc2a692d79dcffc9d0f421d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Serv=C3=A9n=20Mar=C3=ADn?= Date: Tue, 6 Jul 2021 20:45:53 +0200 Subject: [PATCH] Makefile: allow filtering e2e tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit enables the filtering of e2e tests that should be run when using the Makefile's `e2e` target through the specification of the `BASH_UNIT_FLAGS` environment variable. The value of this variable will be passed as arguments to the `bash_unit` command, enabling filtering of tests. Signed-off-by: Lucas Servén Marín --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 907abf1..741cfb1 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,7 @@ EMBEDMD_BINARY := bin/embedmd KIND_BINARY := $(shell pwd)/bin/kind KUBECTL_BINARY := $(shell pwd)/bin/kubectl BASH_UNIT := $(shell pwd)/bin/bash_unit +BASH_UNIT_FLAGS := BUILD_IMAGE ?= golang:1.16.5-alpine BASE_IMAGE ?= alpine:3.13 @@ -208,7 +209,7 @@ $(BASH_UNIT): chmod +x $@ e2e: container $(KIND_BINARY) $(KUBECTL_BINARY) $(BASH_UNIT) bin/$(OS)/$(ARCH)/kgctl - KILO_IMAGE=$(IMAGE):$(ARCH)-$(VERSION) KIND_BINARY=$(KIND_BINARY) KUBECTL_BINARY=$(KUBECTL_BINARY) KGCTL_BINARY=$(shell pwd)/bin/$(OS)/$(ARCH)/kgctl $(BASH_UNIT) ./e2e/setup.sh ./e2e/full-mesh.sh ./e2e/location-mesh.sh ./e2e/teardown.sh + KILO_IMAGE=$(IMAGE):$(ARCH)-$(VERSION) KIND_BINARY=$(KIND_BINARY) KUBECTL_BINARY=$(KUBECTL_BINARY) KGCTL_BINARY=$(shell pwd)/bin/$(OS)/$(ARCH)/kgctl $(BASH_UNIT) $(BASH_UNIT_FLAGS) ./e2e/setup.sh ./e2e/full-mesh.sh ./e2e/location-mesh.sh ./e2e/teardown.sh header: .header @HEADER=$$(cat .header); \