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 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#!/bin/bash
set -euxo pipefail
cd "$(dirname "$(realpath "$0")")"
export RUST_TEST_THREADS=1
rep=$(seq 1 10)
for _ in $rep; do
# shellcheck disable=SC2068
cargo test $@ -- --nocapture
done
export RUSTFLAGS='-Zsanitizer=address'
export RUSTDOCFLAGS="$RUSTFLAGS"
for _ in $rep; do
# shellcheck disable=SC2068
cargo +nightly test $@ -- --nocapture
done
export RUSTFLAGS='-Zsanitizer=thread'
export RUSTDOCFLAGS="$RUSTFLAGS"
target="$(rustc -vV | grep host | cut -d : -f 2 | tr -d '[:space:]')"
for _ in $rep; do
# shellcheck disable=SC2068
cargo +nightly test $@ \
-Z build-std \
--target "$target" \
--features thread-sanitizer \
-- --nocapture
done
#export MIRIFLAGS="-Zmiri-disable-isolation"
#exec cargo +nightly miri \
# nextest run \
# -Z build-std \
# --target "$target" \
# --release
|