net.sourceforge.cobertura.ant

Class AntUtil

abstract class AntUtil extends Object

Method Summary
static voidtransferCoberturaDataFileProperty(Java task)
Used to transfer the net.sourceforge.cobertura.datafile property to a JVM that is about to be forked.

Method Detail

transferCoberturaDataFileProperty

static void transferCoberturaDataFileProperty(Java task)
Used to transfer the net.sourceforge.cobertura.datafile property to a JVM that is about to be forked. This is confusing, but it's required by our functional test. What happens is, we have a JUnit test that runs ant to instrument some classes. When the instrumentation is running, we want to get the coverage info that is created by exercising our instrumentation classes. So we pass in two different coverage files: 1. The coverage data file command line parameter. This tells the instrument task where to write the new coverage data. 2. The coverage data system property. This tells the instrumentation inside the instrumented classes where to keep track of the line hit counts, etc.

Parameters: task The Java task that will do the forking.