blob: 42db447a661c3c4d302570126e3a8cc9579a701c (
plain) (
blame)
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
|
#!/bin/sh
# build coverage server binary
make
# not super fantastic but most likely good enough
export COVSRV_SOCKET=$(mktemp -u)
# server program should always be killed at the end of a test run
cleanup() {
./build/covsrv quit
}
# kill server program even if user interrupted us or something else exceptional
# happened
trap interrupt INT HUP TERM
interrupt () {
cleanup
exit 1
}
# start coverage server, should create a unix socket at COVSRV_SOCKET that test
# programs can connect to
./build/covsrv &
# run tests, pass any flags like -j to make
make coverage "$@"
cleanup
exit 0
|