File: run_tests.sh

package info (click to toggle)
rust-concurrent-arena 0.1.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 188 kB
  • sloc: sh: 22; makefile: 2
file content (41 lines) | stat: -rwxr-xr-x 867 bytes parent folder | download
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