mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
b62b13040b
Signed-off-by: yhmo <yihua.mo@zilliz.com>
16 lines
434 B
Bash
Executable File
16 lines
434 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
echo "mode: atomic" > go_coverage.txt
|
|
|
|
for d in $(go list ./internal... | grep -v vendor); do
|
|
go test -race -coverpkg=./... -coverprofile=profile.out -covermode=atomic "$d"
|
|
if [ -f profile.out ]; then
|
|
sed '1d' profile.out >> go_coverage.txt
|
|
rm profile.out
|
|
fi
|
|
done
|
|
|
|
go tool cover -html=./go_coverage.txt -o ./go_coverage.html
|
|
echo "Export go coverage report to go_coverage.html"
|