Closed hugoArregui closed 11 years ago
Hi,
I have a few problems running lcov_covertura from command line, I wrote a patch with some small changes.
diff --git a/lcov_cobertura/lcov_cobertura.py b/lcov_cobertura/lcov_cobertura.py index f80c0a5..432cbd0 100755 --- a/lcov_cobertura/lcov_cobertura.py +++ b/lcov_cobertura/lcov_cobertura.py @@ -319,14 +319,14 @@ if __name__ == '__main__': dest='output', default='coverage.xml') (options, args) = parser.parse_args(args=argv) - if len(argv) != 2: - print((main.__doc__)) - sys.exit(1) + #if len(argv) != 2: + #print((main.__doc__)) + #sys.exit(1) try: with open(args[1], 'r') as lcov_file: lcov_data = lcov_file.read() - lcov_cobertura = LcovCobertura(lcov_data, options) + lcov_cobertura = LcovCobertura(lcov_data, options.base_dir) cobertura_xml = lcov_cobertura.convert() with open(options.output, mode='wt') as output_file: output_file.write(cobertura_xml)
I just comment the lines that checks argv len, because I don't figure out if it's a needed check. But I want to add, if it's necesary, you need to be carefoul about how the program is invoked,
./lcov_coverage python lcov_coverage
has differents argv values.
Thanks for this amazing tool!
@hugoArregui Thanks for the note. I've corrected this.
Hi,
I have a few problems running lcov_covertura from command line, I wrote a patch with some small changes.
I just comment the lines that checks argv len, because I don't figure out if it's a needed check. But I want to add, if it's necesary, you need to be carefoul about how the program is invoked,
./lcov_coverage python lcov_coverage
has differents argv values.
Thanks for this amazing tool!