eriwen / lcov-to-cobertura-xml

Converts lcov output to Cobertura-compatible XML for CI
https://eriwen.github.io/lcov-to-cobertura-xml/
Apache License 2.0
187 stars 73 forks source link

keep your feature same and add feature to convert gcov to xml #15

Closed jiafu1115 closed 10 years ago

jiafu1115 commented 10 years ago

your code only show how to convert the lcov to cuberuta, I add some code to support how to convert gcov to cuberuta. lcov_cobertura.py lcov-file.info -a srcPath:gcdaPath lcov_cobertura.py -a srcPath1:gcdaPath1 -a srcPath2:gcdaPath2

keep old features for your code and add features to convert gcov to coberuta.xml.

(1) copy gcda/gcna to src code folder for every -a option (2) lcov to lcov info for every srcPath:gcdaPath. (3) merged the lcov infos to one. (4) genhtml the info to html (5) call your features to do convert.

thanks.

Regards.

jiafu1115 commented 10 years ago

@eriwen thanks for your comment. I think it will become not common if using the gcov paths to do test.The root cause is we can't make sure the position for the test. What's more, if the test isn't unit/api test but server application test, the gcda position won't be clear, In brief, we can know the gcda position but we can't make sure the gcda path is test path. And today I add more features to this pull request, such as -w to allow genhtml , as -k to doesn't allow to delete copied files. So , can you accept the last pull request, I had do some test by my project.It is ok now, Thanks

jiafu1115 commented 10 years ago

@eriwen you can refuse the last pull request and merge my newest request which have complete all features I want , what's more, I don't change your features. For test, if we point the test bin's path, we can add test features, such as srcPath:gcdaPath:testbinPath, but in my view, it isn't good practice to do much more jobs related with test.

jiafu1115 commented 10 years ago

@eriwen ,maybe I misunderstand you, do you mean add unit test for added features instead of run test in gcov path?