1
0
Fork 0

Adding upstream version 2.5.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-19 00:20:02 +02:00
parent c71cb8b61d
commit 982828099e
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
783 changed files with 150650 additions and 0 deletions

View file

@ -0,0 +1,52 @@
#!/bin/bash
echo "mode: count" > acc.out
for Dir in . $(find ./* -maxdepth 10 -type d | grep -v vendor);
do
if ls $Dir/*.go &> /dev/null;
then
returnval=`go test -coverprofile=profile.out -covermode=count $Dir`
echo ${returnval}
if [[ ${returnval} != *FAIL* ]]
then
if [ -f profile.out ]
then
cat profile.out | grep -v "mode: count" >> acc.out
fi
else
exit 1
fi
fi
done
# collect integration test coverage
echo "mode: count" > integration-acc.out
INTPACKS=`go list ./... | grep -v vendor | grep -v utils | grep -v 'store/test' | grep -v docs | xargs | sed 's/ /,/g'`
returnval=`go test -coverpkg=$INTPACKS -coverprofile=profile.out -covermode=count ./test`
if [[ ${returnval} != *FAIL* ]]
then
if [ -f profile.out ]
then
cat profile.out | grep -v "mode: count" >> integration-acc.out
fi
else
exit 1
fi
cat acc.out integration-acc.out | go run scripts/merge-coverprofile.go > merged.out
if [ -n "$COVERALLS" ]
then
export GIT_BRANCH=$TRAVIS_BRANCH
goveralls -service drone.io -coverprofile=merged.out -repotoken $COVERALLS
fi
if [ -n "$COVERHTML" ]
then
go tool cover -html=merged.out
fi
rm -rf ./profile.out
rm -rf ./acc.out
rm -rf ./integration-acc.out
rm -rf ./merged.out