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

Add code coverage reporting #74

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Add code coverage reporting #74

wants to merge 14 commits into from

Conversation

mt-caret
Copy link
Owner

@mt-caret mt-caret commented Sep 17, 2023

Closes #2.

Generated code coverage: https://mt-caret.github.io/polars-ocaml-kcov/kcov-merged/index.html

Taking a quick look at the coverage information, it's already quite useful. For example, I didn't realize that we don't really execute the Then and ChainedThen clauses in rust_expr_when_then; probably worth adding a doctest.

@mt-caret
Copy link
Owner Author

mt-caret commented Sep 18, 2023

I tried compiling a simple hello world OCaml program via ocamlopt -g and that shows up in kcov (and dune definitely seems to be passing the -g flag)... The plot thickens...

@mt-caret
Copy link
Owner Author

Following some of the tips described in SimonKagstrom/kcov#242 (comment) what seems to be happening is that dune sandboxing is causing the paths to not be found by kcov, which is why things work with manual compilation with ocamlopt, since that's not sandboxed.

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

Successfully merging this pull request may close these issues.

Get test coverage of OCaml+Rust code
1 participant