You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 24, 2024. It is now read-only.
# The actual coverage numbers appear on lines in the form "coverage: ##.#% of statements in [package]", so the grep and awk statements parse those out and record them
# Note that this statement only generates coverage for integration tests that are actually executed, so e.g. running this against a 7 cluster won't show coverage for 5- or 6-specific code sections
go test -coverpkg=./backup,./filepath,./history,./options,./report,./restore,./toc,./utils ./integration -coverprofile=/tmp/coverage.out 2> /dev/null | grep "coverage:" | awk '{print "integration tests:\t" $2}' > $RESULTS
for PACKAGE in "backup" "filepath" "history" "options" "report" "restore" "toc" "utils" ; do
# Generate unit test coverage statistics for all packages, write the statistics to a file, and print the coverage percentage to the shell
go test -coverpkg "./$PACKAGE" "./$PACKAGE" -coverprofile="/tmp/unit_$PACKAGE.out" | grep "coverage:" | awk '{print $9 " unit tests:\t" $5}' >> $RESULTS
# Filter out the first "mode: set" line from each coverage file and concatenate them all