Skip to content

Commit

Permalink
add TNAMES usage to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
boratanrikulu committed Jul 27, 2024
1 parent 25d08a2 commit 93b2dbd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CLANG ?= clang
CFLAGS := -O2 -g -Wall -Werror $(CFLAGS)
TNAMES ?= .*

.PHONY: generate compile build build-docker test test-docker

Expand All @@ -16,8 +17,11 @@ build: generate compile
build-docker:
docker build -t durdur -f images/Dockerfile .

# To run all tests, just run `make test`.
# If you need to run specific tests, you can use `TNAMES`,
# Example: `TNAMES="TestDrop|TestUndrop" make test`
test: generate
CGO_ENABLED=0 go test -exec sudo ./... -v -cover -coverprofile=coverage.txt -covermode=atomic -p=1
CGO_ENABLED=0 go test -exec sudo ./... -run "^$(TNAMES)$\" -v -cover -coverprofile=coverage.txt -covermode=atomic -p=1

test-docker:
docker build -t durdur-test -q -f images/Dockerfile.tests . && \
Expand Down

0 comments on commit 93b2dbd

Please sign in to comment.