#!/bin/sh set -eu profile=${COVER_PROFILE:-/tmp/go-sip-coverage.out} business_profile=${COVER_BUSINESS_PROFILE:-/tmp/go-sip-coverage-business.out} GOMAXPROCS=${GOMAXPROCS:-2} go test -p 1 -coverpkg=./... -coverprofile="$profile" ./... awk 'NR == 1 || index($0, "/gen/") == 0' "$profile" > "$business_profile" go tool cover -func="$business_profile"