Files
OpenCellular/.ci/coverage.py
2018-10-29 13:42:59 -07:00

15 lines
319 B
Python
Executable File

#!/usr/bin/env python3
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)