Compare commits
1 Commits
cd66f01149
...
d2f7201a10
Author | SHA1 | Date | |
---|---|---|---|
|
d2f7201a10 |
17
.vscode/tasks.json
vendored
17
.vscode/tasks.json
vendored
@ -87,23 +87,6 @@
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "coverage",
|
||||
"type":"shell",
|
||||
"command": "make coverage",
|
||||
"problemMatcher": {
|
||||
"base": "$gcc",
|
||||
"owner": "gcc",
|
||||
"fileLocation": [
|
||||
"relative",
|
||||
"${workspaceFolder}"
|
||||
]
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"presentation": {
|
||||
|
7
Makefile
7
Makefile
@ -6,6 +6,7 @@ CC = $(CROSS_COMPILE)gcc
|
||||
CPP = $(CROSS_COMPILE)cpp
|
||||
CHECK = cppcheck
|
||||
LCOV = lcov
|
||||
GENHTML = genhtml
|
||||
|
||||
SRC_DIR = src
|
||||
OBJ_DIR = obj
|
||||
@ -50,11 +51,7 @@ coverage: $(UNIT_TEST_TARGET)
|
||||
@rm -f $(UNIT_TEST_OBJ_DIR)/*.gcda
|
||||
@rm -f $(UNIT_TEST_OBJ_DIR)/*.gcno
|
||||
$(LCOV) -c -d obj -d bin/test/unit/ -d src/ -d test/unit/ -o test.info --no-external
|
||||
$(eval COVERAGE:=$(shell genhtml -o coverage/html test.info | grep 'lines' | egrep -o '[0-9]+.[0-9]+%'))
|
||||
@echo
|
||||
@echo Line coverage: $(COVERAGE)
|
||||
@echo
|
||||
|
||||
$(GENHTML) -o coverage/html test.info
|
||||
|
||||
.PHONY: unit_test
|
||||
build_unit_test: $(UNIT_TEST_TARGET)
|
||||
|
Loading…
Reference in New Issue
Block a user