run_thread_sanitizer.sh 308 Bytes
Newer Older
1 2
#!/usr/bin/env bash

3
mkdir cmake-build-release-thread-sanitizer
4
cd cmake-build-release-thread-sanitizer
5 6 7 8
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DTHREAD_SANITIZER=ON
make

# run the actual tests with sanitizer enabled, reporting the result
9
TSAN_OPTIONS="exitcode=1" ./bin/tests
10
STATUS_CODE=$?
11 12

exit $STATUS_CODE