mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-25 01:07:22 +00:00
Adding coverage script for jenkins.
This commit is contained in:
13
.ci/coverage.py
Normal file
13
.ci/coverage.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from lcov_cobertura import LcovCobertura
|
||||
|
||||
LCOV_FILE = 'build/coverage/test-coverage.info'
|
||||
OUT_FILE = 'build/coverage/test-coverage.xml'
|
||||
|
||||
with open(LCOV_FILE) as fr:
|
||||
data = fr.read()
|
||||
|
||||
converter = LcovCobertura(data)
|
||||
res = converter.convert()
|
||||
|
||||
with open(OUT_FILE, 'w') as fw:
|
||||
fw.write(res)
|
||||
@@ -177,7 +177,9 @@ clean:
|
||||
.PHONY: FORCE
|
||||
|
||||
ci: CFLAGS += -Werror
|
||||
ci: clean test
|
||||
ci: CFLAGS += -ftest-coverage -fprofile-arcs -fprofile-dir=$(PATHC)$*/
|
||||
ci: COV_CMDS = @mkdir -p $(PATHC)$* && mv *.gcno $(PATHC)$*
|
||||
ci: clean junit coverage
|
||||
|
||||
# Add flags and create extra commands to execute after compiler iff coverage is being done.
|
||||
cov: CFLAGS += -ftest-coverage -fprofile-arcs -fprofile-dir=$(PATHC)$*/
|
||||
|
||||
Reference in New Issue
Block a user