]> git.lizzy.rs Git - dragonfireclient.git/blob - util/travis/script.sh
Unit tests must be done at integration process.
[dragonfireclient.git] / util / travis / script.sh
1 #!/bin/bash -e
2
3 if [ $WINDOWS = "no" ]; then
4         mkdir -p travisbuild
5         cd travisbuild
6         cmake -DENABLE_GETTEXT=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1 -DCMAKE_BUILD_TYPE=Debug ..
7         make -j2
8         echo "Running unit tests for minetest"
9         ../bin/minetest --do-unittests
10         echo "Running unit tests for minetestserver"
11         ../bin/minetestserver --do-unittests
12 else
13         [ $CC = "clang" ] && exit 1 # Not supposed to happen
14         # We need to have our build directory outside of the minetest directory because
15         #  CMake will otherwise get very very confused with symlinks and complain that
16         #  something is not a subdirectory of something even if it actually is.
17         # e.g.:
18         # /home/travis/minetest/minetest/travisbuild/minetest
19         # \/  \/  \/
20         # /home/travis/minetest/minetest/travisbuild/minetest/travisbuild/minetest
21         # \/  \/  \/
22         # /home/travis/minetest/minetest/travisbuild/minetest/travisbuild/minetest/travisbuild/minetest
23         # You get the idea.
24         OLDDIR=`pwd`
25         cd ..
26         [ $WINDOWS = "32" ] && EXISTING_MINETEST_DIR=$OLDDIR NO_MINETEST_GAME=1 $OLDDIR/util/buildbot/buildwin32.sh travisbuild && exit 0
27         [ $WINDOWS = "64" ] && EXISTING_MINETEST_DIR=$OLDDIR NO_MINETEST_GAME=1 $OLDDIR/util/buildbot/buildwin64.sh travisbuild && exit 0
28 fi