1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-11 19:29:20 +08:00

test: only cat test coverage output file whene said file exists

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2017-02-22 22:30:06 +01:00
parent 43604035fc
commit 4ab1c695a0

View File

@ -8,10 +8,8 @@ go test -i ./...
for package in "${PACKAGES[@]}"
do
go test -coverprofile=tmp.cov gobot.io/x/$package
if [ $? -ne 0 ]
then
EXITCODE=1
if [ -f tmp.cov ]; then
cat tmp.cov >> coverage.txt
rm tmp.cov
fi
cat tmp.cov >> coverage.txt
rm tmp.cov
done