mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-11-28 15:31:20 +08:00
Fix the handling of go test -race
The `test-race-works && go test -race || go test` formulation causes tests to be run twice on platforms that support the `-race` option if any test fails. Fixes #1085
This commit is contained in:
parent
d2e7201163
commit
1b5ce7f265
8
Makefile
8
Makefile
|
@ -13,9 +13,11 @@ generate:
|
||||||
go generate ./...
|
go generate ./...
|
||||||
|
|
||||||
test:
|
test:
|
||||||
echo `go env GOOS GOARCH` | egrep -qx '(linux|freebsd|darwin|windows) amd64' \
|
if echo `go env GOOS GOARCH` | egrep -qx '(linux|freebsd|darwin|windows) amd64'; then \
|
||||||
&& go test -race ./... \
|
go test -race ./... ; \
|
||||||
|| go test ./...
|
else \
|
||||||
|
go test ./... ; \
|
||||||
|
fi
|
||||||
|
|
||||||
style:
|
style:
|
||||||
find . -name '*.go' | xargs goimports -w
|
find . -name '*.go' | xargs goimports -w
|
||||||
|
|
Loading…
Reference in New Issue
Block a user