File: test_cover.sh

package info (click to toggle)
golang-github-dnaeon-go-vcr 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 204 kB
  • sloc: makefile: 13; sh: 5
file content (10 lines) | stat: -rwxr-xr-x 382 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env bash

set -e
echo "" > coverage.txt

go list -f '"go test -v -race -covermode=atomic -coverprofile={{.Name}}.coverprofile -coverpkg={{range $i, $f := .XTestImports}}{{if eq (printf "%.24s" $f) "github.com/dnaeon/go-vcr" }}{{$f}},{{end}}{{end}}{{.ImportPath}} {{.ImportPath}}"' ./... | grep -v vendor |  xargs -I {} bash -c {}

gover . coverage.txt

rm *.coverprofile