Skip to content

Commit

Permalink
Always run tsan on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
James Munns committed Jan 13, 2019
1 parent d1bcd7d commit 59369ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ cargo test --manifest-path core/Cargo.toml
cargo test --features="travisci" --manifest-path bbqtest/Cargo.toml -- --nocapture
cargo test --features="travisci" --release --manifest-path bbqtest/Cargo.toml -- --nocapture

if [ $TRAVIS_RUST_VERSION = nightly ]; then
export RUSTFLAGS="-Z sanitizer=thread"
export RUST_TEST_THREADS=1
export TSAN_OPTIONS="suppressions=$(pwd)/tsan-blacklist.txt"
fi

# Test using a full std crate, long test with a single thread (it's faster)
cargo test --manifest-path bbqtest/Cargo.toml -- --nocapture --test-threads=1
cargo test --release --manifest-path bbqtest/Cargo.toml -- --nocapture --test-threads=1

7 changes: 7 additions & 0 deletions tsan-blacklist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# false positives in thread::spawn (?)
race:*dealloc
race:*drop_slow*
race:__call_tls_dtors

# false positives in scoped_threadpool (?)
race:*drop*

0 comments on commit 59369ea

Please sign in to comment.