2019-11-18 20:33:15 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
cd $(dirname "${BASH_SOURCE[0]}")/..
|
|
|
|
|
2019-11-18 20:56:41 +03:00
|
|
|
export CGO_ENABLED=0
|
2019-11-28 20:13:00 +03:00
|
|
|
|
2022-09-23 17:30:03 +03:00
|
|
|
cd tests
|
2022-09-23 17:51:05 +03:00
|
|
|
go test -coverpkg=../internal/server -coverprofile=/tmp/coverage.out $GOTEST
|
2022-09-25 01:42:07 +03:00
|
|
|
|
|
|
|
|
2022-09-25 16:28:17 +03:00
|
|
|
# go test -coverpkg=../internal/... -coverprofile=/tmp/coverage.out \
|
|
|
|
# -v ./... $GOTEST
|
2022-09-25 01:42:07 +03:00
|
|
|
|
2022-09-23 17:30:03 +03:00
|
|
|
go tool cover -html=/tmp/coverage.out -o /tmp/coverage.html
|
|
|
|
echo "details: file:///tmp/coverage.html"
|
|
|
|
cd ..
|
|
|
|
|
2022-09-23 19:04:01 +03:00
|
|
|
if [[ "$GOTEST" == "" ]]; then
|
|
|
|
go test $(go list ./... | grep -v /vendor/ | grep -v /tests)
|
|
|
|
fi
|