Menu

Changing coverage.out

2012-10-30
2013-05-09
  • Chris Rusnak

    Chris Rusnak - 2012-10-30

    I'm using ant and as part of my build process initiate an instrumentation request (after compilation).  I'm having a devil of a time getting the appropriate coverage.out.file location updated properly.  I've tried setting explicit properties in my build.xml file and pointing the instr task to an external properties file but both to no avail.  I've also tried it with the emma. prefix and without. I need to change the location as I want it to sent to the build subdirectory of my project so it is automatically cleaned up and allow CruiseControl to publish all artifacts from one location.

            <emma verbosity="verbose">
                <property name="coverage.out.file" value="${build.dir}/coverage/coverage.ec"/>
                <instr instrpath="${build.classes.dir}"
                    destdir="${build.dir}/instrumented"
                    properties="resources/emma.properties"
                    metadatafile="${build.dir}/coverage/coverage.em">
                    <filter excludes="org.*"/>
                </instr>
            </emma>       

    emma.properties

    emma.coverage.out.file=build/coverage/coverage.ec
    emma.coverage.out.merge=true

     
  • Marc R. Hoffmann

    The coverage output file location can not be specified at instrumentation time. Instead it has to be supplied at runtime. See emma property reference:

    http://emma.sourceforge.net/reference_single/reference.html#prop-ref

    -marc

     

Log in to post a comment.