Skip to content

Added the ability to disable coverage data recording at run-time #162

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

Closed
wants to merge 1 commit into from

Conversation

patrick-premont
Copy link

Added the ability to disable coverage data recording by setting the JVM property scoverage.recording.enabled to false (needed to run the instrumented code on
other machines such as docker containers).

Slight optimization of runtime

…VM property `scoverage.recording.enabled` to `false`

Slight optimization of runtime
@sksamuel
Copy link
Member

sksamuel commented Jun 1, 2016

This could be merged, but I think its dangerous to have instrumentation in real deployables. Is there a useful for that?

@patrick-premont
Copy link
Author

Our use-case was that during development we would run integration tests within docker, where the baked-in coverage data directories do not exists.

We wanted to avoid constantly building everything twice. It is both difficult to manage two such configurations, and time consuming to perform the builds. So we opted to always build with coverage instrumentation during development, and find a way to disable the coverage at run-time for integration tests.

For the real deployables, before we publish the artifacts, we did rebuild everything with coverageOff.

gslowikowski added a commit to scoverage/sbt-scoverage that referenced this pull request Sep 18, 2016
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.

2 participants