How to merge coverage report

Mar 3, 2016 at 3:26 PM
Hello,


I'd like to merge different report. I saw the --input_coverage flag, but could not use it as I'd like.

Let me clarify my context :
  • I have a batch file that call OpenCppCoverage on a set of test cases.
  • The batch file builds the list of test cases at run time and calls OpenCppCoverage for each test case to have a "binary" output
At the end, I have a set of binary report that I'd like to merge.
I understand that I can run OpenCppCoverage with multiple --input_coverage flags, but since I don't know the list in advance, I'd like to do something like :
for each code_coverage_report
OpenCppCoverage --input_coverage=current_code_coverage_report --export_type=html:global_report
Is there any way to achieve this?
When I tried, the second loop iteration fails due to the fact that the "final report" already exists...

Thanks in advance for your help
Regards
Coordinator
Mar 6, 2016 at 12:30 PM
Hello,

Can you test with these commands inside a .bat file:
@echo off
setlocal ENABLEDELAYEDEXPANSION

set line=
for  %%i in (*.cov) do set line=!line! --input_coverage %%i
OpenCppCoverage.exe %line% --export_type=html:global_report
Please let me know if it solves your problem,

OpenCppCoverage
Marked as answer by OpenCppCoverage on 3/7/2016 at 4:25 AM
Mar 7, 2016 at 9:04 AM

Hello,

Thanks for the support.

Works fine !

Best regards

De : OpenCppCoverage [email removed]
Envoyé : dimanche 6 mars 2016 13:30
À : Vincent Julien <[email removed]>
Objet : Re: How to merge coverage report [opencppcoverage:652035]

From: OpenCppCoverage

Hello,

Can you test with these commands inside a .bat file:

@echo off
setlocal ENABLEDELAYEDEXPANSION
 
set line=
for  %%i in (*.cov) do set line=!line! --input_coverage %%i
OpenCppCoverage.exe %line% --export_type=html:global_report

Please let me know if it solves your problem,

OpenCppCoverage