2016-07-13 20:12:11 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-08-25 06:52:34 +08:00
|
|
|
# Enable test coverage recording.
|
|
|
|
export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
|
2016-08-10 19:28:33 +08:00
|
|
|
|
2016-07-13 20:12:11 +08:00
|
|
|
# Build toxcore and run tests.
|
2016-08-26 22:43:29 +08:00
|
|
|
# TODO(iphydf): Enable ASAN. It currently has some bad interactions with gcov,
|
|
|
|
# so it's disabled on Travis.
|
2016-08-25 06:52:34 +08:00
|
|
|
RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install -DDEBUG=ON -DASSOC_DHT=ON #-DASAN=ON
|
2016-08-10 19:28:33 +08:00
|
|
|
|
2016-08-25 06:52:34 +08:00
|
|
|
RUN make -C $BUILD_DIR -j$NPROC -k install
|
2016-07-13 20:12:11 +08:00
|
|
|
|
2016-08-25 06:52:34 +08:00
|
|
|
if $TESTS; then
|
|
|
|
export CTEST_OUTPUT_ON_FAILURE=1
|
|
|
|
RUN make -C $BUILD_DIR -j$NPROC test
|
|
|
|
fi
|