Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Python crashes after generating incorrect coverage files #6

Closed
Thomvis opened this issue May 26, 2015 · 4 comments
Closed

Python crashes after generating incorrect coverage files #6

Thomvis opened this issue May 26, 2015 · 4 comments

Comments

@Thomvis
Copy link
Contributor

Thomvis commented May 26, 2015

I'm trying to run swiftcov on BrightFutures (https://github.com/Thomvis/BrightFutures), but Python crashes and the coverage reports seem to be incorrect (every line begins with -:). I haven't tried to run it on a different project yet.

In the Xcode console, the last lines read:

Generating gcov files...
Created './coverage/ExecutionContext.swift.gcov'
Created './coverage/BoxType.swift.gcov'
...
Created './coverage/Errors.swift.gcov'
Coverage files successfully generated to './coverage'
Failed to execute xcode build command

Full console log can be found here: https://gist.github.com/Thomvis/bd5a11c53180db9613be.

At that time, a window pops up saying 'Python quit unexpectedly'. See screenshot:
screen shot 2015-05-26 at 22 01 03

Full log can be found here: https://gist.github.com/Thomvis/1e90c2465b54560d0cde

An example .gcov file can be found here: https://gist.github.com/Thomvis/854ba0715902a5f60406

Arguments used to run swiftcov: generate --output ./coverage xcodebuild -project BrightFutures.xcodeproj -scheme 'BrightFutures-Mac' -configuration Release -sdk macosx test

Let me know if you need more info!

@kishikawakatsumi
Copy link
Contributor

I cannot reproduce this issue yet. Could you please share the reproducible project? Please send to [email protected] .

And to isolate the problem, please let me confirm following:

Can you succeeded to run about the example project? https://github.com/realm/SwiftCov/tree/master/Examples/ExampleFramework

What happens if Debug configuration? Please try to run after changing the configuration option to Debug.

Thank you very much for reporting. 🙇

@kishikawakatsumi
Copy link
Contributor

@Thomvis I finally understood the issue. You probably run swiftcov from Xcode? It is a weird behavior; the issue was caused only when run from Xcode. The coverage report is not generated correctly and crash at the end of the process.

If so, please install swiftcov command and run from command line. Since it is not likely to fix immediately.

@Thomvis
Copy link
Contributor Author

Thomvis commented May 28, 2015

@kishikawakatsumi yes I am running it from Xcode. Will try to run it from the command line and report back.

@Thomvis
Copy link
Contributor Author

Thomvis commented May 28, 2015

Running it from the command line fixed it. Great! Really cool to inspect those .gcov files.

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

No branches or pull requests

2 participants