Skip to content

Commit

Permalink
Update makefile and enable race detection on x64 arch (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaofei0800 authored Apr 13, 2020
1 parent e4b0bc4 commit 2f53cc3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ GOTEST := $(GO) test
GOVET := $(GO) vet
GOGET := $(GO) get
GOGEN := $(GO) generate
GOFLAGS := -race
STATICCHECK := staticcheck

# init arch
ARCH := $(shell getconf LONG_BIT)
ifeq ($(ARCH),64)
GOTEST += $(GOFLAGS)
endif

# init bfe version
BFE_VERSION ?= $(shell cat VERSION)

Expand Down Expand Up @@ -60,7 +67,7 @@ vet-case:
# make coverage for codecov
coverage:
echo -n > coverage.txt
for pkg in $(BFE_PKGS) ; do $(GOTEST) -race -coverprofile=profile.out -covermode=atomic $${pkg} && cat profile.out >> coverage.txt; done
for pkg in $(BFE_PKGS) ; do $(GOTEST) -coverprofile=profile.out -covermode=atomic $${pkg} && cat profile.out >> coverage.txt; done

# make package
package:
Expand Down

0 comments on commit 2f53cc3

Please sign in to comment.