-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests.sh
52 lines (39 loc) · 1.29 KB
/
run_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
#!/bin/bash
LOG_FILE="run_tests.log"
set -e
set -x
ALT_IP="100.109.190.53"
CLIENT_FLAGS="" #"-l $ALT_IP -t $ALT_IP"
SERVER_FLAGS="" #"-a $ALT_IP"
INVOCATION_SEMANTICS=(
"--invocation-semantics maybe"
"--invocation-semantics at-least-once"
"--invocation-semantics at-most-once"
)
SIM_OMMISIONS=(
"--simulate-ommisions 10"
"--simulate-ommisions 100"
"--simulate-ommisions 1000"
"--simulate-ommisions 10000"
"--simulate-ommisions 100000"
"--simulate-ommisions 1000000"
)
cargo build --release
# iterate over each elemtn in the INVOCATION_SEMANTICS array
for INVO in "${INVOCATION_SEMANTICS[@]}"; do
# iter over all SIM_OMMISIONS
for SIM_OMIT in "${SIM_OMMISIONS[@]}"; do
echo "Running tests with $INVO and $SIM_OMIT" >> $LOG_FILE
echo "running normal server" >> $LOG_FILE
cargo run --release --bin rfs_server -- $INVO $SERVER_FLAGS &
SERVER_PID=$!
cargo run --bin rfs_client -- $INVO $SIM_OMIT --test $CLIENT_FLAGS
kill $SERVER_PID
echo "running faulty server" >> $LOG_FILE
cargo run --bin rfs_server -- $INVO $SIM_OMIT $SERVER_FLAGS &
SERVER_PID=$!
cargo run --release --bin rfs_client -- $INVO $SIM_OMIT --test $CLIENT_FLAGS
kill $SERVER_PID
sleep 0.5
done
done