Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
destfile agent parameter should be absolute also for default value #301
At apache lucene we use carrot labs junit4 (http://labs.carrotsearch.com/randomizedtesting-junit4.html) which spawns multiple JVMs to make use of all of our cpus.
It seems a little confusing since the default (jacoco.exec) is actually a relative path, but its impossible to set any relative path other than the default since the setter does this conversion.
For us its important that each jvm get a separate file (the easiest way to do that is a relative path), when we create our report we just provide all of them and everything works. The issue is easy to workaround, we just append the filename directly to the result of
In ant it is easy for someone to convert a relative path to an absolute one in their build script themselves, if they are doing something advanced and really need it.
This is actually intentional: The working directory of the Ant script is typically different from the JVM running the tests. If we would use a relative path the exec file would not be written at the location which is specified in the Ant file - which what you actually want but would probably break most user's builds.
How do you create your JVMs, also from Ant? In this case you could run jacoco:agent separately for every JVM.
We don't create the JVMs from ant. the junit4 library forks them (we pass numcpus=auto by default as well).
There seems to be a bug either way. if the absolute path is intentional, then the default 'jacoco.exec' should be computed as an absolute path, too. But its not, as the setter isn't invoked in that case.