1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#!/bin/bash run() { $1 --no-default-features && $1 --no-default-features --features async && $1 && $1 --features async } test() { export RUSTFLAGS="-Zsanitizer=$1" run "cargo +nightly test --features thread_sanitiser -Zbuild-std --target x86_64-unknown-linux-gnu --test tests" && run "cargo +nightly run --features thread_sanitiser -Zbuild-std --target x86_64-unknown-linux-gnu --example simple" && run "cargo +nightly run --features thread_sanitiser -Zbuild-std --target x86_64-unknown-linux-gnu --example uninit_items" && cargo +nightly run --features thread_sanitiser --features async -Zbuild-std --target x86_64-unknown-linux-gnu --example simple_async } echo "Running Address sanitiser..." && test address && echo "Running Leak sanitiser..." && test leak && echo "Running Memory sanitiser..." && test memory && echo "Running Thread sanitiser..." && test thread