Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some problems using it from command line #9

Closed
hugoArregui opened this issue Sep 24, 2012 · 1 comment
Closed

some problems using it from command line #9

hugoArregui opened this issue Sep 24, 2012 · 1 comment
Assignees
Labels

Comments

@hugoArregui
Copy link
Contributor

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!

@eriwen eriwen closed this as completed in e282f3a Sep 24, 2012
@ghost ghost assigned eriwen Sep 24, 2012
@eriwen
Copy link
Owner

eriwen commented Sep 24, 2012

@hugoArregui Thanks for the note. I've corrected this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants