summaryrefslogtreecommitdiff
path: root/other/travis/toxcore-script
blob: d25dc135d077938126522debb8b9fb2d5b60c177 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

# Enable test coverage recording.
export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"

# Build toxcore and run tests.
# TODO(iphydf): Enable ASAN. It currently has some bad interactions with gcov,
# so it's disabled on Travis.
RUN $CMAKE                                      \
  -B$BUILD_DIR                                  \
  -H.                                           \
  -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install  \
  -DASAN=ON                                     \
  -DDEBUG=ON                                    \
  -DSTRICT_ABI=ON                               \
  -DTEST_TIMEOUT_SECONDS=300                    \
  -DTRACE=ON                                    \
  $CMAKE_EXTRA_FLAGS

export CTEST_OUTPUT_ON_FAILURE=1

RUN make -C$BUILD_DIR -j$NPROC -k install
TESTS make -C$BUILD_DIR -j$NPROC test