-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·31 lines (28 loc) · 791 Bytes
/
test.sh
File metadata and controls
executable file
·31 lines (28 loc) · 791 Bytes
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
#!/bin/sh
cargo test
RUSTC=`which rustc`
echo
echo Test that release version excludes debug
cargo build --release
# Assuming the -C settings below create a release level version?
$RUSTC tests-release/test_release.rs \
-C opt-level=3 \
-C debug-assertions=off \
--out-dir ./target/release \
-L ./target/release
if ./target/release/test_release
then
echo "Test result: Success"
else
echo "Test result: Fail!"
fi
echo
echo Test that compile failures are comprehensible
echo
$RUSTC tests-cfail/cfail-1.rs -L ./target/debug
$RUSTC tests-cfail/cfail-2.rs -L ./target/debug
$RUSTC tests-cfail/cfail-3.rs -L ./target/debug
$RUSTC tests-cfail/cfail-4.rs -L ./target/debug
$RUSTC tests-cfail/cfail-5.rs -L ./target/debug
$RUSTC tests-cfail/cfail-6.rs -L ./target/debug
echo