2024-06-24 14:51:06 -04:00
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
|
|
|
|
|
. "$DIR/../prelude.sh"
|
|
|
|
|
|
2021-03-25 10:37:15 +03:00
|
|
|
set +o errexit
|
|
|
|
|
|
2024-06-24 14:51:06 -04:00
|
|
|
cd src
|
|
|
|
|
|
|
|
|
|
if [ ! -d "./build/debug" ]; then
|
|
|
|
|
echo "No code coverage to process - no 'build/debug' directory found."
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
file_list=$(find ./build/debug -type f -name "*.gcno")
|
|
|
|
|
if [ ! -n "$file_list" ]; then
|
|
|
|
|
echo "No code coverage to process - no '.gcno' files found."
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
2022-03-28 19:58:09 +00:00
|
|
|
if [ -z "${GCOV_TOOL:-}" ]; then
|
|
|
|
|
echo "No coverage tool defined. Set the gcov_tool expansion in evergreen.yml" >&2
|
2024-06-24 14:51:06 -04:00
|
|
|
exit 0
|
2022-03-28 19:58:09 +00:00
|
|
|
fi
|
|
|
|
|
|
2024-06-24 14:51:06 -04:00
|
|
|
echo "Found code coverage files:"
|
|
|
|
|
find ./build/debug -type f -name "*.gcno"
|
|
|
|
|
|
|
|
|
|
activate_venv
|
|
|
|
|
|
|
|
|
|
pipx install "cpp-coveralls==0.4.2" || exit 1
|
|
|
|
|
|
2024-07-25 09:24:05 -04:00
|
|
|
# Run coveralls and upload data.
|
|
|
|
|
# View at https://coveralls.io/github/10gen/mongo
|
2024-06-24 14:51:06 -04:00
|
|
|
cpp-coveralls \
|
2024-07-26 00:04:22 -04:00
|
|
|
--root . \
|
2024-06-24 14:51:06 -04:00
|
|
|
--build-root . \
|
|
|
|
|
--verbose \
|
|
|
|
|
--gcov ${GCOV_TOOL[@]} \
|
2024-07-26 00:04:22 -04:00
|
|
|
--exclude src/third_party/ \
|
|
|
|
|
--exclude ./grammar.yy \
|
|
|
|
|
--exclude ./parser_gen.hpp \
|
|
|
|
|
--exclude ./parser_gen.cpp
|