mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-18 14:47:03 +00:00
test: Generate a prettier coverage report
To make the coverage report a bit more accessible and easier to navigate, this patch makes the coverage tests generate a new HTML coverage report (in addition to the classic variant).
This commit is contained in:
@@ -44,11 +44,15 @@ go run "${UTILDIR}/gocovcat.go" .coverage/*.out \
|
||||
|
||||
# Generate reports based on the merged output.
|
||||
go tool cover -func="$COVER_DIR/all.out" | sort -k 3 -n > "$COVER_DIR/func.txt"
|
||||
go tool cover -html="$COVER_DIR/all.out" -o "$COVER_DIR/chasquid.html"
|
||||
go tool cover -html="$COVER_DIR/all.out" -o "$COVER_DIR/classic.html"
|
||||
go run "${UTILDIR}/coverhtml.go" \
|
||||
-input="$COVER_DIR/all.out" -strip=3 \
|
||||
-output="$COVER_DIR/coverage.html" \
|
||||
-title="chasquid coverage report" \
|
||||
-notes="Generated at commit <tt>$(git describe --always --dirty)</tt> ($(git log -1 --format=%ci))"
|
||||
|
||||
echo
|
||||
grep total .coverage/func.txt
|
||||
echo
|
||||
echo "Coverage report can be found in:"
|
||||
echo file://$COVER_DIR/chasquid.html
|
||||
echo file://$COVER_DIR/coverage.html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user