github.com/golang/dep@v0.5.4/hack/coverage.bash (about) 1 #!/usr/bin/env bash 2 # Copyright 2017 The Go Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style 4 # license that can be found in the LICENSE file. 5 # 6 # This script will generate coverage.txt. 7 8 set -e 9 10 PKGS=$(go list ./... | grep -v /vendor/) 11 for pkg in $PKGS; do 12 go test -timeout=300s -race -coverprofile=profile.out -covermode=atomic $pkg 13 if [[ -f profile.out ]]; then 14 cat profile.out >> coverage.txt 15 rm profile.out 16 fi 17 done