File: test.sh

package info (click to toggle)
golang-github-masterzen-winrm 0.0~git20160323.0752679-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 256 kB
  • ctags: 180
  • sloc: makefile: 34; sh: 14
file content (12 lines) | stat: -rwxr-xr-x 287 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
set -e

go test -v ./...

mkdir -p .cover
go list ./... | xargs -I% bash -c 'name="%"; go test -covermode=count % --coverprofile=.cover/${name//\//_} '
echo "mode: count" > profile.cov
cat .cover/* | grep -v mode >> profile.cov
rm -rf .cover

go tool cover -func=profile.cov