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-10-05 03:44:35 +08:00
|
|
|
RUN $CMAKE \
|
|
|
|
-B$BUILD_DIR \
|
|
|
|
-H. \
|
2016-10-05 03:28:26 +08:00
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install \
|
2016-10-05 03:44:35 +08:00
|
|
|
-DDEBUG=ON \
|
|
|
|
-DASSOC_DHT=ON \
|
|
|
|
-DSTRICT_ABI=ON \
|
2016-10-03 13:52:43 +08:00
|
|
|
-DTEST_TIMEOUT_SECONDS=300 \
|
|
|
|
$CMAKE_EXTRA_FLAGS #-DASAN=ON
|
2016-08-10 19:28:33 +08:00
|
|
|
|
2016-08-25 06:52:34 +08:00
|
|
|
export CTEST_OUTPUT_ON_FAILURE=1
|
2016-07-13 20:12:11 +08:00
|
|
|
|
2016-08-25 06:52:34 +08:00
|
|
|
RUN make -C$BUILD_DIR -j$NPROC -k install
|
|
|
|
TESTS make -C$BUILD_DIR -j$NPROC test
|