2018-08-19 19:02:16 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
CACHEDIR="$HOME/cache"
|
|
|
|
|
|
|
|
. ".travis/flags-$CC.sh"
|
|
|
|
add_flag -Werror
|
2018-08-20 05:34:02 +08:00
|
|
|
add_flag -fdiagnostics-color=always
|
2020-04-05 01:49:03 +08:00
|
|
|
add_flag -fno-omit-frame-pointer
|
2018-08-19 19:02:16 +08:00
|
|
|
add_flag -fsanitize=thread
|
2020-04-29 20:09:34 +08:00
|
|
|
cmake -B_build -H. -GNinja \
|
2018-08-19 19:02:16 +08:00
|
|
|
-DCMAKE_C_FLAGS="$C_FLAGS" \
|
|
|
|
-DCMAKE_CXX_FLAGS="$CXX_FLAGS" \
|
|
|
|
-DCMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \
|
|
|
|
-DCMAKE_SHARED_LINKER_FLAGS="$LD_FLAGS" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH="$PWD/_install" \
|
2019-01-07 00:13:31 +08:00
|
|
|
-DMIN_LOGGER_LEVEL=TRACE \
|
2018-08-19 19:02:16 +08:00
|
|
|
-DMUST_BUILD_TOXAV=ON \
|
2020-04-29 20:09:34 +08:00
|
|
|
-DNON_HERMETIC_TESTS=ON \
|
2018-08-19 19:02:16 +08:00
|
|
|
-DSTRICT_ABI=ON \
|
|
|
|
-DTEST_TIMEOUT_SECONDS=120 \
|
2018-10-07 02:03:52 +08:00
|
|
|
-DUSE_IPV6=OFF \
|
|
|
|
-DAUTOTEST=ON
|
2018-08-19 19:02:16 +08:00
|
|
|
|
|
|
|
cd _build
|
|
|
|
|
|
|
|
ninja install -j$(nproc)
|
|
|
|
|
2018-08-27 03:08:34 +08:00
|
|
|
export TSAN_OPTIONS="halt_on_error=1"
|
|
|
|
export TSAN_OPTIONS="$TSAN_OPTIONS,second_deadlock_stack=1"
|
2020-04-05 01:49:03 +08:00
|
|
|
export TSAN_OPTIONS="$TSAN_OPTIONS,symbolize=1"
|
2018-08-19 19:02:16 +08:00
|
|
|
ctest -j50 --output-on-failure ||
|
2018-08-27 03:08:34 +08:00
|
|
|
ctest -j50 --output-on-failure --rerun-failed
|