-
Notifications
You must be signed in to change notification settings - Fork 0
/
coverage.sh
executable file
·51 lines (43 loc) · 1.27 KB
/
coverage.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
#!/bin/bash
TIMEOUT=2500
CARGO_ARGS="-q"
##### Setup cargo-llvm-cov #####
source <(cargo llvm-cov show-env --export-prefix)
cargo llvm-cov clean --workspace
cargo build
##### Run rust tests #####
cargo test
##### Run vxi11 tests #####
# Start the server
./target/debug/examples/vxi11 --timeout $TIMEOUT --register &
VXI11_PID=$!
# Run pytest and tell it to not instantiate its own server
DEBUG_TARGET="localhost" pytest vxi11
# Wait for server to exit
wait $VXI11_PID
##### Run hislip tests #####
# Start the server
./target/debug/examples/hislip --timeout $TIMEOUT &
HISLIP_PID=$!
# Run pytest and tell it to not instantiate its own server
DEBUG_TARGET="localhost" pytest hislip
# Wait for server to exit
wait $HISLIP_PID
##### Run telnet tests #####
# Start the server
./target/debug/examples/telnet --timeout $TIMEOUT &
TELNET_PID=$!
# Run pytest and tell it to not instantiate its own server
DEBUG_TARGET="localhost" pytest telnet
# Wait for server to exit
wait $TELNET_PID
##### Run socket tests #####
# Start the server
./target/debug/examples/raw --timeout $TIMEOUT &
SOCKET_PID=$!
# Run pytest and tell it to not instantiate its own server
DEBUG_TARGET="localhost" pytest raw
# Wait for server to exit
wait $SOCKET_PID
##### Generate and open report #####
cargo llvm-cov report "$@"