kaspad/test.sh
Ori Newman 733d06af5a [NOD-617] Remove test coverage from test.sh (#569)
* [NOD-617] Remove test coverage from test.sh

* [NOD-617] Log coverage
2020-01-06 10:31:09 +02:00

18 lines
482 B
Bash
Executable File

#!/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 {}"
retVal=$?
if [ $retVal -ne 0 ]
then
echo " >> tests failed"
exit 1
else
echo " >> tests completed successfully"
exit 0
fi