Update the UT scripts to fail in case UT failure
@@ -3,12 +3,11 @@ set -e
export COVERAGE_PATH=$(pwd)
cd $1
for d in $(go list ./... | grep -v vendor); do
- cd $HOME/gopath/src/
- cd $d
- set +e
+ cd $HOME/gopath/src/$d
+ if [ $(ls | grep _test.go | wc -l) -gt 0 ]; then
go test -cover -covermode atomic -coverprofile coverage.out
if [ -f coverage.out ]; then
sed '1d;$d' coverage.out >> $HOME/gopath/src/github.com/servicecomb/service-center/coverage.txt
fi
- set -e
+ fi
done
