-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.sh
executable file
·29 lines (28 loc) · 1.2 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
set -e
govendor fetch +missing
echo "> govendor remove +unused"
govendor remove +unused
echo "> govendor fetch +missing"
govendor fetch +missing
echo "> govendor update +local"
govendor update +local
#echo "> go get github.com/stretchr/testify/assert"
#go get github.com/stretchr/testify/assert
#echo "> go get -d"
#go get -d
if [ ! -d resources/coverity ];then
mkdir -p resources/coverity
fi
echo "> go test -cover -coverprofile=resources/coverity/qwatch.cover"
go test -cover -coverprofile=resources/coverity/qwatch.cover >>/dev/null
COVER_FILES="resources/coverity/qwatch.cover"
for x in $(find . -maxdepth 1 -type d |egrep -v "(\.$|\.git|vendor|bin|resources)");do
echo "> go test -cover -coverprofile=resources/coverity/${x}.cover ${x}"
go test -cover -coverprofile=resources/coverity/${x}.cover ${x} >>/dev/null
COVER_FILES="${COVER_FILES} resources/coverity/${x}.cover"
done
echo "> coveraggregator -o resources/coverity/coverage-all.out ${COVER_FILES}"
coveraggregator -o resources/coverity/coverage-all.out ${COVER_FILES} >>/dev/null
#go tool cover -func=coverage-all.outcover |tee ./resources/coverity/coverage-all.out
#go tool cover -html=coverage-all.out -o resources/coverity/all.html