mercoledì 22 agosto 2012

Fixing the "development mode" for coverage testing - netbeans 7.2

If  you have already tried the "test coverage" development option for the mingw build, you probably have noticed that it doesn't do anything special, it is just a normal debug build.

To enable the coverage testing you have two ways:
1) just add the --coverage options in the compilation line, it works but I find it a bit ugly.
2) Fix the "test coverage" option.
First you have to follow this link, to have the xml for the various toolchains:

http://netbeans.org/kb/69/cnd/toolchain.html

The xmls are dumped (in my windows machine) in :
C:\Documents and Settings\Administrator\Application Data\NetBeans\7.2\config\CND\ToolChain

The file to edit is ( for mingw_tdm)  Mingw_TDM.xml

Look for this section, and put the following values, it is easy, once you know where to look for

        <development_mode>
            <fast_build flags=""/>
            <debug default="true" flags="-g"/>
            <performance_debug flags="-g -O"/>
            <test_coverage flags="-g --coverage"/>
            <diagnosable_release flags="-g -O2"/>
            <release flags="-O2"/>
            <performance_release flags="-O3"/>
        </development_mode>





Nessun commento:

Posta un commento