Skip to content

Commit 62d5169

Browse files
committed
Fail script if command fails
Use the Bash `set -e` option to make the test script fail if a command fails. While we are at it add sanity check commands that call the compiler and `cargo`.
1 parent 5c466a8 commit 62d5169

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/test.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/sh -ex
22

3+
set -e
4+
35
FEATURES="compiler use-serde rand"
46

57
# Use toolchain if explicitly specified
@@ -8,6 +10,9 @@ then
810
alias cargo="cargo +$TOOLCHAIN"
911
fi
1012

13+
cargo --version
14+
rustc --version
15+
1116
# Format if told to
1217
if [ "$DO_FMT" = true ]
1318
then

0 commit comments

Comments
 (0)