File tree 3 files changed +15
-1
lines changed
3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ matrix:
22
22
- env : PLATFORM=Unix COMPILER=clang
23
23
compiler : clang
24
24
os : linux
25
+ - env : PLATFORM=Unix COMPILER=clang VALGRIND=1
26
+ compiler : clang
27
+ os : linux
28
+ dist : trusty
25
29
- env : PLATFORM=Unix COMPILER=g++-6
26
30
compiler : gcc
27
31
os : linux
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ if [[ $PLATFORM == "Unix" ]]; then
18
18
# Linking to LevelDB is broken, use a custom build
19
19
wget http://minetest.kitsunemimi.pw/libleveldb-1.18-ubuntu12.04.7z
20
20
sudo 7z x -o/usr libleveldb-1.18-ubuntu12.04.7z
21
+ if [[ " $VALGRIND " == " 1" ]]; then
22
+ sudo apt-get install valgrind
23
+ fi
21
24
else
22
25
brew update
23
26
brew install freetype gettext hiredis irrlicht jpeg leveldb libogg libvorbis luajit
Original file line number Diff line number Diff line change @@ -24,8 +24,15 @@ if [[ $PLATFORM == "Unix" ]]; then
24
24
-DBUILD_SERVER=TRUE \
25
25
$CMAKE_FLAGS ..
26
26
make -j2
27
+
27
28
echo " Running unit tests."
28
- ../bin/minetest --run-unittests && exit 0
29
+ CMD=" ../bin/minetest --run-unittests"
30
+ if [[ " $VALGRIND " == " 1" ]]; then
31
+ valgrind --leak-check=full --leak-check-heuristics=all --undef-value-errors=no --error-exitcode=9 ${CMD} && exit 0
32
+ else
33
+ ${CMD} && exit 0
34
+ fi
35
+
29
36
elif [[ $PLATFORM == Win* ]]; then
30
37
[[ $CC == " clang" ]] && exit 1 # Not supposed to happen
31
38
# We need to have our build directory outside of the minetest directory because
You can’t perform that action at this time.
0 commit comments