Skip to content

Commit

Permalink
fix: update Makefile to include unit test packages in test commands
Browse files Browse the repository at this point in the history
  • Loading branch information
omarsy committed Jan 5, 2025
1 parent cc7c9af commit d557db6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(
HTTPS_GIT := https://github.com/TERITORI/teritorid.git

PACKAGES_E2E=$(shell cd tests/e2e && go list ./... | grep '/e2e')
PACKAGES_UNIT=$(shell go list ./... | grep -v -e '/tests/e2e')

export GO111MODULE = on

Expand Down Expand Up @@ -134,16 +135,16 @@ test: test-unit
test-all: test-race test-cover test-system

test-unit:
@VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' ./...
@VERSION=$(VERSION) go test -mod=readonly $(PACKAGES_UNIT) -tags='ledger test_ledger_mock' ./...

test-race:
@VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock' ./...
@VERSION=$(VERSION) go test -mod=readonly $(PACKAGES_UNIT) -race -tags='ledger test_ledger_mock' ./...

test-cover:
@go test -mod=readonly -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...
@go test -mod=readonly $(PACKAGES_UNIT) -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...

benchmark:
@go test -mod=readonly -bench=. ./...
@go test -mod=readonly $(PACKAGES_UNIT) -bench=. ./...

test-sim-import-export: runsim
@echo "Running application import/export simulation. This may take several minutes..."
Expand Down

0 comments on commit d557db6

Please sign in to comment.