diff --git a/Makefile b/Makefile index 5bd994ea3..96ebe8242 100644 --- a/Makefile +++ b/Makefile @@ -147,15 +147,15 @@ test-race: run-tests test-evmd: ARGS=-timeout=15m test-evmd: - @cd evmd && go test -tags=test -mod=readonly $(ARGS) $(EXTRA_ARGS) $(PACKAGES_EVMD) + @cd evmd && go test -race -tags=test -mod=readonly $(ARGS) $(EXTRA_ARGS) $(PACKAGES_EVMD) test-unit-cover: ARGS=-timeout=15m -coverprofile=coverage.txt -covermode=atomic test-unit-cover: TEST_PACKAGES=$(PACKAGES_UNIT) test-unit-cover: run-tests @echo "๐Ÿ” Running evm (root) coverage..." - @go test -tags=test $(COMMON_COVER_ARGS) -coverpkg=$(COVERPKG_ALL) -coverprofile=coverage.txt ./... + @go test -race -tags=test $(COMMON_COVER_ARGS) -coverpkg=$(COVERPKG_ALL) -coverprofile=coverage.txt ./... @echo "๐Ÿ” Running evmd coverage..." - @cd evmd && go test -tags=test $(COMMON_COVER_ARGS) -coverpkg=$(COVERPKG_ALL) -coverprofile=coverage_evmd.txt ./... + @cd evmd && go test -race -tags=test $(COMMON_COVER_ARGS) -coverpkg=$(COVERPKG_ALL) -coverprofile=coverage_evmd.txt ./... @echo "๐Ÿ”€ Merging evmd coverage into root coverage..." @tail -n +2 evmd/coverage_evmd.txt >> coverage.txt && rm evmd/coverage_evmd.txt @echo "๐Ÿงน Filtering ignored files from coverage.txt..." @@ -167,15 +167,15 @@ test: test-unit test-all: @echo "๐Ÿ” Running evm module tests..." - @go test -tags=test -mod=readonly -timeout=15m $(PACKAGES_NOSIMULATION) + @go test -race -tags=test -mod=readonly -timeout=15m $(PACKAGES_NOSIMULATION) @echo "๐Ÿ” Running evmd module tests..." - @cd evmd && go test -tags=test -mod=readonly -timeout=15m $(PACKAGES_EVMD) + @cd evmd && go test -race -tags=test -mod=readonly -timeout=15m $(PACKAGES_EVMD) run-tests: ifneq (,$(shell which tparse 2>/dev/null)) - go test -tags=test -mod=readonly -json $(ARGS) $(EXTRA_ARGS) $(TEST_PACKAGES) | tparse + go test -race -tags=test -mod=readonly -json $(ARGS) $(EXTRA_ARGS) $(TEST_PACKAGES) | tparse else - go test -tags=test -mod=readonly $(ARGS) $(EXTRA_ARGS) $(TEST_PACKAGES) + go test -race -tags=test -mod=readonly $(ARGS) $(EXTRA_ARGS) $(TEST_PACKAGES) endif # Use the old Apple linker to workaround broken xcode - https://github.com/golang/go/issues/65169 @@ -184,11 +184,11 @@ ifeq ($(OS_FAMILY),Darwin) endif test-fuzz: - go test -tags=test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzMintCoins ./x/precisebank/keeper - go test -tags=test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzBurnCoins ./x/precisebank/keeper - go test -tags=test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzSendCoins ./x/precisebank/keeper - go test -tags=test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzGenesisStateValidate_NonZeroRemainder ./x/precisebank/types - go test -tags=test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzGenesisStateValidate_ZeroRemainder ./x/precisebank/types + go test -race -tags=test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzMintCoins ./x/precisebank/keeper + go test -race -tags=test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzBurnCoins ./x/precisebank/keeper + go test -race -tags=test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzSendCoins ./x/precisebank/keeper + go test -race -tags=test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzGenesisStateValidate_NonZeroRemainder ./x/precisebank/types + go test -race -tags=test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzGenesisStateValidate_ZeroRemainder ./x/precisebank/types test-scripts: @echo "Running scripts tests" @@ -201,7 +201,7 @@ test-solidity: .PHONY: run-tests test test-all $(TEST_TARGETS) benchmark: - @go test -tags=test -mod=readonly -bench=. $(PACKAGES_NOSIMULATION) + @go test -race -tags=test -mod=readonly -bench=. $(PACKAGES_NOSIMULATION) .PHONY: benchmark