-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·36 lines (28 loc) · 926 Bytes
/
run_tests.sh
File metadata and controls
executable file
·36 lines (28 loc) · 926 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
32
33
34
35
36
#!/bin/bash
set -e
TERM_PURPLE='\033[0;35m'
TERM_BOLD='\033[1m'
TERM_RESET='\033[0m'
section() {
echo -e "${TERM_PURPLE}${TERM_BOLD}=== $1 ===${TERM_RESET}"
}
# argument: "feature1,feature2,..."
test_only_features() {
local features="$1"
section "no default + $features"
cargo test --lib --bins --tests --benches --no-default-features --features "$features" > /dev/null
}
test_additional_features() {
local features="$1"
section "default + $features"
cargo test --lib --bins --tests --benches --features "$features" > /dev/null
}
test_only_features "no_std"
test_only_features "no_std,multithreaded"
test_only_features "no_std,num-bigint"
test_only_features "no_std,multithreaded,num-bigint"
test_additional_features "multithreaded"
test_additional_features "num-bigint"
test_additional_features "multithreaded,num-bigint"
section "All Default Features and doctests"
cargo test > /dev/null