Skip to content

Commit

Permalink
Tests should not fail fast
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedam committed Jul 24, 2021
1 parent 5af8e63 commit 02d57ca
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test.sh
Expand Up @@ -3,10 +3,18 @@
set -e
echo "" > coverage.txt

failed=0

for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic $d
go test -race -coverprofile=profile.out -covermode=atomic $d && true
rc=$?
if [ $rc != 0 ]; then
failed=$rc
fi
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done

exit ${failed}

0 comments on commit 02d57ca

Please sign in to comment.