blob: f4b03ae1ecbfbebf5934426c908ed04812066ad4 (
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
31
32
|
CFLAGS = -Wall -Wextra -O0 -g -Iinclude
.PHONY: all
all:
mkdir -p build
$(CC) $(CFLAGS) src/server.c -o build/covsrv
.PHONY: clean
clean:
rm -rf build reports coverage vgcore.*
build/pass: include/covsrv/covsrv.h src/client.c tests/pass.c
$(CC) $(CFLAGS) --coverage -DCOVERAGE=1 src/client.c tests/pass.c -o build/pass
.PHONY: xpass
.IGNORE: xpass
xpass: build/pass
./scripts/run-test build/pass
build/fail: include/covsrv/covsrv.h src/client.c tests/fail.c
$(CC) $(CFLAGS) --coverage -DCOVERAGE=1 src/client.c tests/fail.c -o build/fail
.PHONY: xfail
.IGNORE: xfail
xfail: build/fail
./scripts/run-test build/fail
.PHONY: check
coverage: all xpass xfail
mkdir -p coverage
lcov --capture --directory . --out coverage/covsrv.info
genhtml coverage/covsrv.info --out coverage
|