File: run_test.sh

package info (click to toggle)
rust-tokio-io-utility 0.7.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 160 kB
  • sloc: sh: 42; makefile: 2
file content (63 lines) | stat: -rwxr-xr-x 1,590 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash -ex

arch=$(uname -m)
if [ "$arch" = "arm64" ]; then
    arch=aarch64
fi

os=unknown-linux-gnu
if uname -v | grep -s Darwin >/dev/null; then
    os=apple-darwin
fi

target="$arch-$os"

rep=$(seq 1 10)

for _ in $rep; do
    cargo test --all-features -- --nocapture
done

export RUSTFLAGS='-Zsanitizer=address'
cargo +nightly test --all-features async_read_utility -- --nocapture
cargo +nightly test --all-features async_write_utility -- --nocapture
cargo +nightly test --all-features io_slice_ext -- --nocapture
cargo +nightly test --all-features reusable_io_slices -- --nocapture
cargo +nightly test --all-features init_maybeuninit_io_slice -- --nocapture

for _ in $rep; do
    cargo +nightly test --all-features queue -- --nocapture
done

# thread sanitizer reports false positive in crossbeam
#export RUSTFLAGS='-Zsanitizer=thread' 
#
#for _ in $rep; do
#    cargo +nightly test \
#        -Z build-std \
#        --target "$target" \
#        --all-features queue::tests::test_par -- --nocapture
#done

unset RUSTFLAGS
export MIRIFLAGS="-Zmiri-disable-isolation"

cargo +nightly miri test \
    -Z build-std \
    --target "$target" \
    --all-features io_slice_ext -- --nocapture

cargo +nightly miri test \
    -Z build-std \
    --target "$target" \
    --all-features reusable_io_slices -- --nocapture

cargo +nightly miri test \
    -Z build-std \
    --target "$target" \
    --all-features init_maybeuninit_io_slice -- --nocapture

exec cargo +nightly miri test \
    -Z build-std \
    --target "$target" \
    --all-features queue::tests::test_seq -- --nocapture