Makefile: allow filtering e2e tests

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 <lserven@gmail.com>
This commit is contained in:
Lucas Servén Marín 2021-07-06 20:45:53 +02:00
parent 6b5001bf0e
commit 8c7e58a231
No known key found for this signature in database
GPG Key ID: 586FEAF680DA74AD

View File

@ -43,6 +43,7 @@ EMBEDMD_BINARY := bin/embedmd
KIND_BINARY := $(shell pwd)/bin/kind KIND_BINARY := $(shell pwd)/bin/kind
KUBECTL_BINARY := $(shell pwd)/bin/kubectl KUBECTL_BINARY := $(shell pwd)/bin/kubectl
BASH_UNIT := $(shell pwd)/bin/bash_unit BASH_UNIT := $(shell pwd)/bin/bash_unit
BASH_UNIT_FLAGS :=
BUILD_IMAGE ?= golang:1.16.5-alpine BUILD_IMAGE ?= golang:1.16.5-alpine
BASE_IMAGE ?= alpine:3.13 BASE_IMAGE ?= alpine:3.13
@ -208,7 +209,7 @@ $(BASH_UNIT):
chmod +x $@ chmod +x $@
e2e: container $(KIND_BINARY) $(KUBECTL_BINARY) $(BASH_UNIT) bin/$(OS)/$(ARCH)/kgctl 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: .header
@HEADER=$$(cat .header); \ @HEADER=$$(cat .header); \