enable -race on go test (#7305)

Introduce 'norace' build tag that is used to
filter out test files containing test cases
or test suites that, if run with the -race
flag on would cause race conditions.

Supersede #7300.
This commit is contained in:
Alessio Treglia
2020-09-15 10:43:46 +01:00
committed by GitHub
parent a8990eab71
commit 7ada179aef
21 changed files with 127 additions and 8 deletions
+4 -4
View File
@@ -211,10 +211,10 @@ TEST_TARGETS := test-unit test-unit-amino test-unit-proto test-ledger-mock test-
# a new rule, customise ARGS or TEST_PACKAGES ad libitum, and
# append the new rule to the TEST_TARGETS list.
test-unit: ARGS=-tags='cgo ledger test_ledger_mock'
test-unit-amino: ARGS=-tags='ledger test_ledger_mock test_amino'
test-ledger: ARGS=-tags='cgo ledger'
test-ledger-mock: ARGS=-tags='ledger test_ledger_mock'
test-unit: ARGS=-tags='cgo ledger test_ledger_mock norace'
test-unit-amino: ARGS=-tags='ledger test_ledger_mock test_amino norace'
test-ledger: ARGS=-tags='cgo ledger norace'
test-ledger-mock: ARGS=-tags='ledger test_ledger_mock norace'
test-race: ARGS=-race -tags='cgo ledger test_ledger_mock'
test-race: TEST_PACKAGES=$(PACKAGES_NOSIMULATION)