Set timeout for tests in Makefile test target

This commit is contained in:
James Mills 2022-04-04 10:07:01 +10:00
parent c9428080e6
commit 0581affa56
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6

View File

@ -71,14 +71,14 @@ fmt:
@$(GOCMD) fmt ./...
test:
@CGO_ENABLED=1 $(GOCMD) test -v -cover -race ./...
@CGO_ENABLED=1 $(GOCMD) test -d -v -cover -race -timeout 30s ./...
coverage:
@CGO_ENABLED=1 $(GOCMD) test -v -cover -race -cover -coverprofile=coverage.out ./...
@CGO_ENABLED=1 $(GOCMD) test -d -v -cover -race -timeout 30s -cover -coverprofile=coverage.out ./...
@$(GOCMD) tool cover -html=coverage.out
bench:
@CGO_ENABLED=1 $(GOCMD) test -v -cover -race -cover -coverprofile=coverage.out ./...
@CGO_ENABLED=1 $(GOCMD) test -d -v -cover -race -timeout 30s -cover -coverprofile=coverage.out ./...
@CGO_ENABLED=1 $(GOCMD) test -race -benchtime=1x -cpu 16 -benchmem -bench "^(Benchmark)" .
clean: