how to convert codecov coverage results to Cobertura(Jenkins) file format

how to convert codecov coverage results to Cobertura(Jenkins) file format

I have done the code coverage Analysis of my CPP code using Intel codecov tool. Now i want to convert the result and want to see analysis using Cobertura file format. Please give the steps to do so.

Thank

3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

The code coverage tool comes with Intel C++ Compiler does not output the result in Cobertura format. But you might be able to add a layer to convert the result.

Here is the steps on using the code coverage tool from Intel C++ compiler:

  1. compile the code with /Qprof-gen:srcpos /Qcov-gen /Qprof_dir:.\codecov
  2. run the app and it will generates a .dyn file under the .\codecov folder and you can run the app multiple times with different input data, and each time it will generate an unique .dyn file.
  3. run "profmerge" tool to merge the .dyn files into a summary file "pgopti.dpi" file
  4. finally run "codecov" tool:         >> codecov -prj test1 -dpi test1.dpi -txtbcvrg test1_bcvrg.txt

the last step above generates a text file. You can create a script to convert the txt file to other format.

More detailed info can be found from this Code Coverage link.

Jennifer

 

I had the same issue, trying to convert XML from the codecov tool to Cobertura XML format. I ended up writing a Python script for converting to Cobertura format, see https://github.com/halvorlu/codecov-to-cobertura . Hope it can be useful to others as well.

Halvor

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui