2016-07-13 20:12:11 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-08-11 20:49:49 +08:00
|
|
|
set -e -u -x
|
|
|
|
. other/travis/env-$ENV.sh
|
2016-08-10 19:28:33 +08:00
|
|
|
|
2016-07-13 20:12:11 +08:00
|
|
|
# Build toxcore and run tests.
|
2016-08-18 00:36:05 +08:00
|
|
|
export CFLAGS="-O3 -fprofile-arcs -ftest-coverage -DTRAVIS_ENV=1"
|
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.
|
|
|
|
RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDEBUG=ON -DASSOC_DHT=ON #-DASAN=ON
|
2016-08-10 19:28:33 +08:00
|
|
|
|
|
|
|
export CTEST_OUTPUT_ON_FAILURE=1
|
2016-07-13 20:12:11 +08:00
|
|
|
|
2016-08-18 00:36:05 +08:00
|
|
|
RUN $MAKE -C $BUILD_DIR -j$NPROC -k
|
|
|
|
RUN $MAKE -C $BUILD_DIR -j$NPROC test
|