@@ -147,15 +147,15 @@ test-race: run-tests
147147
148148test-evmd : ARGS=-timeout=15m
149149test-evmd :
150- @cd evmd && go test -tags=test -mod=readonly $(ARGS ) $(EXTRA_ARGS ) $(PACKAGES_EVMD )
150+ @cd evmd && go test -race - tags=test -mod=readonly $(ARGS ) $(EXTRA_ARGS ) $(PACKAGES_EVMD )
151151
152152test-unit-cover : ARGS=-timeout=15m -coverprofile=coverage.txt -covermode=atomic
153153test-unit-cover : TEST_PACKAGES=$(PACKAGES_UNIT )
154154test-unit-cover : run-tests
155155 @echo " 🔍 Running evm (root) coverage..."
156- @go test -tags=test $(COMMON_COVER_ARGS ) -coverpkg=$(COVERPKG_ALL ) -coverprofile=coverage.txt ./...
156+ @go test -race - tags=test $(COMMON_COVER_ARGS ) -coverpkg=$(COVERPKG_ALL ) -coverprofile=coverage.txt ./...
157157 @echo " 🔍 Running evmd coverage..."
158- @cd evmd && go test -tags=test $(COMMON_COVER_ARGS ) -coverpkg=$(COVERPKG_ALL ) -coverprofile=coverage_evmd.txt ./...
158+ @cd evmd && go test -race - tags=test $(COMMON_COVER_ARGS ) -coverpkg=$(COVERPKG_ALL ) -coverprofile=coverage_evmd.txt ./...
159159 @echo " 🔀 Merging evmd coverage into root coverage..."
160160 @tail -n +2 evmd/coverage_evmd.txt >> coverage.txt && rm evmd/coverage_evmd.txt
161161 @echo " 🧹 Filtering ignored files from coverage.txt..."
@@ -167,15 +167,15 @@ test: test-unit
167167
168168test-all :
169169 @echo " 🔍 Running evm module tests..."
170- @go test -tags=test -mod=readonly -timeout=15m $(PACKAGES_NOSIMULATION )
170+ @go test -race - tags=test -mod=readonly -timeout=15m $(PACKAGES_NOSIMULATION )
171171 @echo " 🔍 Running evmd module tests..."
172- @cd evmd && go test -tags=test -mod=readonly -timeout=15m $(PACKAGES_EVMD )
172+ @cd evmd && go test -race - tags=test -mod=readonly -timeout=15m $(PACKAGES_EVMD )
173173
174174run-tests :
175175ifneq (,$(shell which tparse 2>/dev/null) )
176- go test -tags=test -mod=readonly -json $(ARGS) $(EXTRA_ARGS) $(TEST_PACKAGES) | tparse
176+ go test -race - tags=test -mod=readonly -json $(ARGS) $(EXTRA_ARGS) $(TEST_PACKAGES) | tparse
177177else
178- go test -tags=test -mod=readonly $(ARGS) $(EXTRA_ARGS) $(TEST_PACKAGES)
178+ go test -race - tags=test -mod=readonly $(ARGS) $(EXTRA_ARGS) $(TEST_PACKAGES)
179179endif
180180
181181# Use the old Apple linker to workaround broken xcode - https://github.com/golang/go/issues/65169
@@ -184,11 +184,11 @@ ifeq ($(OS_FAMILY),Darwin)
184184endif
185185
186186test-fuzz :
187- go test -tags=test $(FUZZLDFLAGS ) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzMintCoins ./x/precisebank/keeper
188- go test -tags=test $(FUZZLDFLAGS ) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzBurnCoins ./x/precisebank/keeper
189- go test -tags=test $(FUZZLDFLAGS ) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzSendCoins ./x/precisebank/keeper
190- go test -tags=test $(FUZZLDFLAGS ) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzGenesisStateValidate_NonZeroRemainder ./x/precisebank/types
191- go test -tags=test $(FUZZLDFLAGS ) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzGenesisStateValidate_ZeroRemainder ./x/precisebank/types
187+ go test -race - tags=test $(FUZZLDFLAGS ) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzMintCoins ./x/precisebank/keeper
188+ go test -race - tags=test $(FUZZLDFLAGS ) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzBurnCoins ./x/precisebank/keeper
189+ go test -race - tags=test $(FUZZLDFLAGS ) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzSendCoins ./x/precisebank/keeper
190+ go test -race - tags=test $(FUZZLDFLAGS ) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzGenesisStateValidate_NonZeroRemainder ./x/precisebank/types
191+ go test -race - tags=test $(FUZZLDFLAGS ) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzGenesisStateValidate_ZeroRemainder ./x/precisebank/types
192192
193193test-scripts :
194194 @echo " Running scripts tests"
@@ -201,7 +201,7 @@ test-solidity:
201201.PHONY : run-tests test test-all $(TEST_TARGETS )
202202
203203benchmark :
204- @go test -tags=test -mod=readonly -bench=. $(PACKAGES_NOSIMULATION )
204+ @go test -race - tags=test -mod=readonly -bench=. $(PACKAGES_NOSIMULATION )
205205
206206.PHONY : benchmark
207207
0 commit comments