chore: add -race flag to go tests (#10629)
This commit is contained in:
parent
551138743e
commit
6b1860219c
|
|
@ -77,11 +77,17 @@ commands:
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: windows-go-<< parameters.cache_version >>-{{ checksum "go.sum" }}
|
key: windows-go-<< parameters.cache_version >>-{{ checksum "go.sum" }}
|
||||||
- run: 'sh ./scripts/installgo_windows.sh'
|
- run: 'sh ./scripts/installgo_windows.sh'
|
||||||
|
- run: choco install mingw
|
||||||
- run: mkdir -p test-results
|
- run: mkdir -p test-results
|
||||||
- run: ./scripts/install_gotestsum.sh << parameters.os >> << parameters.gotestsum >>
|
- run: ./scripts/install_gotestsum.sh << parameters.os >> << parameters.gotestsum >>
|
||||||
|
- unless:
|
||||||
|
condition:
|
||||||
|
equal: [ "386", << parameters.arch >> ]
|
||||||
|
steps:
|
||||||
|
- run: echo 'export RACE="-race"' >> $BASH_ENV
|
||||||
- run: |
|
- run: |
|
||||||
PACKAGE_NAMES=$(go list ./... | circleci tests split --split-by=timings --timings-type=classname)
|
PACKAGE_NAMES=$(go list ./... | circleci tests split --split-by=timings --timings-type=classname)
|
||||||
GOARCH=<< parameters.arch >> ./<< parameters.gotestsum >> --junitfile test-results/gotestsum-report.xml -- -short $PACKAGE_NAMES
|
GOARCH=<< parameters.arch >> ./<< parameters.gotestsum >> --junitfile test-results/gotestsum-report.xml -- ${RACE} -short $PACKAGE_NAMES
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: test-results
|
path: test-results
|
||||||
- when:
|
- when:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue