Changes between Version 70 and Version 71 of AutotestStatus


Ignore:
Timestamp:
Mar 15, 2009, 7:54:04 AM (15 years ago)
Author:
Even Rouault
Comment:

Document how to build for coverage reporting

Legend:

Unmodified
Added
Removed
Modified
  • AutotestStatus

    v70 v71  
    163163You can find the [http://even.rouault.free.fr coverage] of the Autotest suite.
    164164
     165You can apply the following procedure (for a Unix build) to build GDAL with coverage support :
     166  * checkout GDAL SVN repository
     167  * apply attached patch at the root at the GDAL tree : patch -p0 < coverage.patch
     168  * configure GDAL : ./configure --without-libtool
     169  * build GDAL : make
     170  * run any command using GDAL : LD_LIBRARY_PATH=$PWD apps/gdalinfo test.tif
     171  * generate a .info file from the collected data : lcov --directory . --capture --output-file gdal.info
     172  * remove unrelevant info with the following attached program (filter_info.c : gcc filter_info.c -o filter_info) : ./filter_info < gdal.info > gdal_filtered.info
     173  * generate the HTML report in the coverage_html directory : genhtml -o ./coverage_html --num-spaces 2 gdal_filtered.info
     174
     175If you want to generate a new coverage report, remove all .gcda files first (rm -f `find . -name *.gcda`) and redo the last 4 previous steps.
     176
     177Note : the coverage.patch is hackish and makes GDAL makefile lose some dependency rules. So if you modify a source file, make sure to remove libgdal.so before running make.