mirror of
https://github.com/helm/helm.git
synced 2026-08-03 14:40:48 +00:00
Adapt test-coverage command to be able to run for a certain package
Signed-off-by: Stephanie Hohenberg <stephanie.hohenberg@gmail.com>
This commit is contained in:
@@ -19,9 +19,10 @@ set -euo pipefail
|
||||
covermode=${COVERMODE:-atomic}
|
||||
coverdir=$(mktemp -d /tmp/coverage.XXXXXXXXXX)
|
||||
profile="${coverdir}/cover.out"
|
||||
target="${1:-./...}" # by default the whole repository is tested
|
||||
|
||||
generate_cover_data() {
|
||||
for d in $(go list ./...) ; do
|
||||
for d in $(go list "$target"); do
|
||||
(
|
||||
local output="${coverdir}/${d//\//-}.cover"
|
||||
go test -coverprofile="${output}" -covermode="$covermode" "$d"
|
||||
|
||||
Reference in New Issue
Block a user