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

Hangs in python3 with --demangle #34

Closed typelogic closed 2 years ago

typelogic commented 4 years ago

Works in python2.

I tried in python3 it hangs and no visible error messages. So I removed the --demangle argument and it does not hang and it produced the xml.

Thanks men.

typelogic commented 4 years ago

python3 needs sudo apt install python3-distutils

ensc commented 3 years ago

a

--- lcov_cobertura.py.orig  2020-09-29 14:49:44.666000000 +0200
+++ lcov_cobertura.py   2020-09-29 14:49:47.646000000 +0200
@@ -37,6 +37,7 @@
     def demangle(self, name):
         newname = name + "\n"
         self.pipe.stdin.write(newname.encode('utf-8'))
+        self.pipe.stdin.flush()
         res = self.pipe.stdout.readline()
         return str(res.rstrip())

fixes it here

v-lopez commented 3 years ago

Also works with python2 in case anyone is wondering, even if it's not needed.

eriwen commented 2 years ago

This was fixed with ea9b81367a0c1d2551d6542b5054537eab726f8a I believe.