Hi all,
We have a CMake based build and test system for our C/C++ based project. I am trying to integrate unit test code coverage in our CI/CD pipeline. The commands which I use for coverage processing are lcov and genhtml.
My tool versions are:-
cmake version 3.7.2
LCOV version 1.14-3-gebfeb3e
Excerpt from my .gitlab-ci.yml looks like the following:
Now I have the my coverage running on the pipeline and values get printed on the Gitlab terminal.
The issue I am facing now is :- I am not aware of what does this “coverage: regex” line is doing for me.
I thought this line would help me to retrieve the coverage values from the terminal prints and help me in introducing a check against coverage threshold values and fail the pipeline.
An alternate way would be to implement a shell script to read the terminal output and parse the coverage results and implement the coverage check in the script. But I would like to confirm if there are any Gitlab specific options that help me with that (eg: using this coverage line or any other).
Could you please guide me on that?
Thanking you for your time and understanding. Looking forward to hearing from you soon.
Best regards,
Honey Sukesan