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
#!/bin/sh -ve
||
# install cargo subcommands
# run test.sh without sanitizers
RUSTFLAGS=""
# run test.sh with sanitizers only on nightly
version=
if [ ;then
RUSTFLAGS="-Z sanitizer=address"
RUSTFLAGS="-Z sanitizer=thread"
if [ ;then # the leak sanitizer is only available on Linux
RUSTFLAGS="-Z sanitizer=leak"
fi
# RUSTFLAGS="-Z sanitizer=memory" ./test.sh # not working, see: https://github.com/rust-lang/rust/issues/39610
fi
# go back to root crate
# try to generate doc
# run unit tests