test: only cat test coverage output file whene said file exists
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
43604035fc
commit
4ab1c695a0
|
@ -8,10 +8,8 @@ go test -i ./...
|
||||||
for package in "${PACKAGES[@]}"
|
for package in "${PACKAGES[@]}"
|
||||||
do
|
do
|
||||||
go test -coverprofile=tmp.cov gobot.io/x/$package
|
go test -coverprofile=tmp.cov gobot.io/x/$package
|
||||||
if [ $? -ne 0 ]
|
if [ -f tmp.cov ]; then
|
||||||
then
|
|
||||||
EXITCODE=1
|
|
||||||
fi
|
|
||||||
cat tmp.cov >> coverage.txt
|
cat tmp.cov >> coverage.txt
|
||||||
rm tmp.cov
|
rm tmp.cov
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue