mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-04 13:16:43 +00:00
[NOD-687] Remove -gcflags='-l' from all tests (#616)
This commit is contained in:
parent
f7800eb5c4
commit
aa74b51e6f
@ -28,7 +28,7 @@ RUN golint -set_exit_status ./...
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o kaspad .
|
||||
|
||||
# Remove the line below and uncomment the line after it for testing with coverage
|
||||
RUN go test -gcflags='-l' ./...
|
||||
RUN go test ./...
|
||||
# RUN ./test.sh
|
||||
|
||||
# --- multistage docker build: stage #2: runtime image
|
||||
|
3
test.sh
3
test.sh
@ -1,10 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Test each package separately
|
||||
# Function inlining messes with monkey patching so we disable it by passing -gcflags='-l'
|
||||
# Running tests with -covermode=atomic saves us from race conditions unique to the testing environment
|
||||
go list ./... | \
|
||||
xargs -n1 -I{} sh -c "go test -gcflags='-l' -timeout 60s -covermode=atomic -cover {}"
|
||||
xargs -n1 -I{} sh -c "go test -timeout 60s -covermode=atomic -cover {}"
|
||||
|
||||
retVal=$?
|
||||
if [ $retVal -ne 0 ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user