-
Notifications
You must be signed in to change notification settings - Fork 20
/
run_all_tests.sh
executable file
·59 lines (58 loc) · 1.72 KB
/
run_all_tests.sh
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
#!/bin/bash
filter_output() {
printf '==> %-40s' "$(basename $1)"
if [ -z "$VERBOSE" ]; then
OUT=$($1 2>&1)
RET=$?
if [ $RET -ne 0 ]; then
echo "fail: $RET"
echo "$OUT"
exit 1
else
echo "ok"
fi
else
echo
$1
RET=$?
if [ $RET -ne 0 ]; then
echo "===> fail: $RET"
echo "$OUT"
exit 1
else
echo "===> ok"
fi
fi
}
# check if variable TARGET is set
if [ -z "$TARGET" ]; then
export TARGET=release
fi
if [ $TARGET = "debug" ]; then
TARGET_OPT=""
else
TARGET_OPT=--release
fi
cargo test $TARGET_OPT &&
filter_output ./tests/local_nodes_dtn.sh &&
filter_output ./tests/local_nodes_ipn.sh &&
filter_output ./tests/local_ping_echo.sh &&
filter_output ./tests/local_group_test.sh &&
filter_output ./tests/local_trigger_test.sh &&
filter_output ./tests/local_nodes_dtn_httppull.sh &&
filter_output ./tests/local_nodes_http_dtn.sh &&
filter_output ./tests/store_delete.sh &&
filter_output ./tests/store_delete_singleton.sh &&
filter_output ./tests/lifetime.sh &&
filter_output ./tests/cla_chain_test.sh &&
filter_output ./tests/ecla_test.sh &&
filter_output ./tests/ecla_test_chain.sh &&
filter_output ./tests/ecla_test_mtcp.sh &&
filter_output ./tests/ecla_test_json_mtcp.sh &&
filter_output ./tests/erouting_epidemic.sh &&
filter_output ./tests/ecla_erouting_test_mtcp.sh &&
filter_output ./tests/routing_saw.sh &&
filter_output ./tests/routing_static.sh &&
filter_output ./tests/ext_peer_management.sh &&
filter_output ./tests/ext_peer_management_ipn.sh &&
echo "SUCCESS"