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