1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-07 17:47:14 +00:00

dovecot: Include cli-based tests in the coverage tests

Many areas of the dovecot library are tested via chamuyero scripts, but
these were not being included in the coverage report.

This patch extends the dovecot-auth-cli tests so that they are now
coverage-aware.
This commit is contained in:
Alberto Bertogli
2018-06-04 01:18:24 +01:00
parent 5adb13311b
commit 36692b52d3
10 changed files with 64 additions and 14 deletions

View File

@@ -8,7 +8,13 @@ init
# Build the binary once, so we can use it and launch it in chamuyero scripts.
# Otherwise, we not only spend time rebuilding it over and over, but also "go
# run" masks the exit code, which is something we care about.
go build dovecot-auth-cli.go
if [ "${COVER_DIR}" != "" ]; then
go test -covermode=count -coverpkg=../../... -c \
$GOFLAGS -tags="coveragebin $GOTAGS"
cp coverage_wrapper dovecot-auth-cli
else
go build $GOFLAGS -tags="$GOTAGS" dovecot-auth-cli.go
fi
for i in *.cmy; do
if ! chamuyero $i > $i.log 2>&1 ; then
@@ -19,3 +25,4 @@ for i in *.cmy; do
done
success
exit 0