1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

CI: Add memleak checking using valgrind (#5350)

Add a new step to check memleaks on our current unit tests suite
This commit is contained in:
Loïc Blot 2017-03-06 20:34:02 +01:00 committed by GitHub
parent 0e27b4b978
commit 9878ce05e7
3 changed files with 15 additions and 1 deletions

View file

@ -24,8 +24,15 @@ if [[ $PLATFORM == "Unix" ]]; then
-DBUILD_SERVER=TRUE \
$CMAKE_FLAGS ..
make -j2
echo "Running unit tests."
../bin/minetest --run-unittests && exit 0
CMD="../bin/minetest --run-unittests"
if [[ "$VALGRIND" == "1" ]]; then
valgrind --leak-check=full --leak-check-heuristics=all --undef-value-errors=no --error-exitcode=9 ${CMD} && exit 0
else
${CMD} && exit 0
fi
elif [[ $PLATFORM == Win* ]]; then
[[ $CC == "clang" ]] && exit 1 # Not supposed to happen
# We need to have our build directory outside of the minetest directory because