Skip to content

Commit 6e7cb86

Browse files
committed
Change test command to pkg loop due to test output streaming issue
See golang/go#46959
1 parent 5b63303 commit 6e7cb86

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,19 @@ image:
2525
docker build -t coupergateway/couper:latest .
2626

2727
test:
28-
go test -v -short -race -count 1 -timeout 300s ./...
28+
@echo "Running tests..."
29+
@for PACKAGE in $$(go list ./...); do \
30+
echo "Testing $$PACKAGE"; \
31+
if go test -v -timeout 90s -race -count=1 $$PACKAGE; then \
32+
echo "\033[32m✔ $$PACKAGE PASSED\033[0m"; \
33+
else \
34+
echo "\033[31m✖ $$PACKAGE FAILED\033[0m"; \
35+
exit 1; \
36+
fi; \
37+
done
38+
@echo "\033[32m✔ All tests passed!\033[0m"
39+
40+
2941

3042
test-docker:
3143
docker run --rm -v $(CURDIR):/go/app -w /go/app golang:$(GO_VERSION) sh -c "go test -short -count 1 -v -timeout 300s -race ./..."

0 commit comments

Comments
 (0)