Skip to content
Myr

test(make): modify test folder and test command in Makefile (#4465)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by HolynnChen · committed by GitHub · parent a39670f · Browse files · 1 file+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>

Diff stats

1 file+6 added−2 removed

  • other:+6 added−2 removed

1 file+6 added−2 removed

modified:Makefile+6 added-2 removed
2 unmodified lines
3GO_VERSION=$(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)4PACKAGES ?= $(shell $(GO) list ./...)5VETPACKAGES ?= $(shell $(GO) list ./... | grep -v /examples/)6GOFILES := $(shell find . -name "*.go")7TESTFOLDER := $(shell $(GO) list ./... | grep -E 'gin$$|binding$$|render$$' | grep -v examples)7TESTFOLDER := $(shell $(GO) list ./... | grep -E 'gin$$|ginS$$|binding$$|render$$' | grep -v examples)8TESTTAGS ?= ""910.PHONY: test11# Run tests to verify code functionality.12test:13 echo "mode: count" > coverage.out14 for d in $(TESTFOLDER); do \15 if [ -n "$(TESTTAGS)" ]; then \15 $(GO) test $(TESTTAGS) -v -covermode=count -coverprofile=profile.out $$d > tmp.out; \16 $(GO) test $(TESTTAGS) -v -covermode=count -coverprofile=profile.out $$d > tmp.out; \17 else \18 $(GO) test -v -covermode=count -coverprofile=profile.out $$d > tmp.out; \19 fi; \20 cat tmp.out; \21 if grep -q "^--- FAIL" tmp.out; then \22 rm tmp.out; \23 exit 1; \
87 unmodified lines