From 02d57ca76d36c0b699dc337f1b81b6f54b81fea2 Mon Sep 17 00:00:00 2001 From: ikedam Date: Sat, 24 Jul 2021 15:56:57 +0900 Subject: [PATCH] Tests should not fail fast --- test.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 34dbbfb31..d99b4e2f1 100755 --- a/test.sh +++ b/test.sh @@ -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}