Skip to content

Commit

Permalink
hack/coverprofiles.sh: Delete cover.out after generating page
Browse files Browse the repository at this point in the history
Signed-off-by: Heathcliff <[email protected]>
  • Loading branch information
heathcliff26 committed Dec 12, 2024
1 parent 86c2857 commit fad47e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hack/coverprofile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ script_dir="$(dirname "${BASH_SOURCE[0]}" | xargs realpath)/.."
pushd "${script_dir}" >/dev/null

OUT_DIR="${script_dir}/coverprofiles"
APP="fleetlock"

if [ ! -d "${OUT_DIR}" ]; then
mkdir "${OUT_DIR}"
fi

go test -coverprofile="${OUT_DIR}/cover-${APP}.out" -coverpkg "./..." "./..."
go tool cover -html "${OUT_DIR}/cover-${APP}.out" -o "${OUT_DIR}/index.html"
go test -coverprofile="${OUT_DIR}/cover.out" -coverpkg "./..." "./..."
go tool cover -html "${OUT_DIR}/cover.out" -o "${OUT_DIR}/index.html"
rm "${OUT_DIR}/cover.out"

popd >/dev/null

0 comments on commit fad47e9

Please sign in to comment.