sbt coverage test hangs on large projects

169 views
Skip to first unread message

Rüdiger Klaehn

unread,
Feb 19, 2015, 4:42:23 PM2/19/15
to scala-code-c...@googlegroups.com
Hi all,

I am trying to get scoverage to work with spire ( https://github.com/non/spire ). On my machine, the coverage test seems to hang. I understand that there is a significant performance degradation involved with the coverage instrumentation. But currently I am at a loss how to solve the issue. Is there a way to figure out where exactly it is stuck?

Cheers,

Rüdiger

Stephen Samuel

unread,
Feb 20, 2015, 12:59:39 PM2/20/15
to scala-code-c...@googlegroups.com
You'd have to see which tests run and which don't, and note when you get to a test that hangs. Could be a large method or large class at that point. Or a bug.
I can help if you create a branch / project with scoverage setup and then all I need to is test it.

Rüdiger Klaehn

unread,
Feb 20, 2015, 2:15:55 PM2/20/15
to scala-code-c...@googlegroups.com
Am Freitag, 20. Februar 2015 18:59:39 UTC+1 schrieb Stephen Samuel:
You'd have to see which tests run and which don't, and note when you get to a test that hangs. Could be a large method or large class at that point. Or a bug.

The strange thing is that it works on one machine (pretty standard i7 desktop running ubuntu) after increasing SBT heap memory to 2G, but hangs on my private machine (2014 macbook pro). 
 
I can help if you create a branch / project with scoverage setup and then all I need to is test it.

I have added the plugin to the master branch of spire. So just get https://github.com/non/spire

Rüdiger Klaehn

unread,
Feb 21, 2015, 11:47:49 AM2/21/15
to scala-code-c...@googlegroups.com
I have tracked it down to a single test: https://github.com/non/spire/blob/master/tests/src/test/scala/spire/random/GeneratorTest.scala

When you comment out that test, the entire sbt clean coverage test runs in acceptable time (5 minutes on my machine). 

I tried excluding the namespace of the stuff being tested (spire.random.rng) from coverage, but that does not change the run time.
Reply all
Reply to author
Forward
0 new messages