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

Support coverage results for non-library code #1359

mgsloan opened this issue Nov 17, 2015 · 3 comments

Support coverage results for non-library code #1359

mgsloan opened this issue Nov 17, 2015 · 3 comments


Copy link

mgsloan commented Nov 17, 2015

See #1008 . I'm thinking this would look like adding a --coverage-exe flag. Or, some other name, TBH one of the reasons this doesn't exist is that there's no concise name for this flag that obviously corresponds to its behavior.

The implementation would look like:

  • Have a variant of the tix file munging which filters out all the package-qualified module names. Use this to process the resulting tix file.
  • Only provide one --srcdir argument to the hpc program - the path to the package associated with the test-suite.
  • Omit the --include argument.

Due to some hpc funkiness, these results will not be able to be included in the unified coverage report, or any coverage reports that span multiple packages.

Copy link

ezyang commented Jan 4, 2016

I was looking for the Cabal code for this, and I noticed that Cabal passes the same hpcdir for each component that is being built. Would it be better for Stack if Cabal passed a distinct hpcdir in each case? This seems "more correct" to me but I'd like to see what is best for you guys (even if it's, "Keep the old behavior, because otherwise you guys have to introduce BC handling...")

Copy link
Contributor Author

mgsloan commented Jan 4, 2016

Unfortunately, that isn't sufficient. Thanks for considering it, though! I've added more details here.

Copy link

I really would like to know what test code is actual used in my tests.
Since unused test code is definitely a code smell!

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

No branches or pull requests

3 participants