Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r9617edd radde1ba  
    4343TESTSOUNDS := python/tests/sounds
    4444
    45 LCOVOPTS += --rc lcov_branch_coverage=1
    46 
    4745all: build
    4846
     
    248246coverage: force_uninstall_python deps_python \
    249247        clean_python clean distclean build local_dylib
    250         # capture coverage after running c tests
    251         lcov $(LCOVOPTS) --capture --no-external --directory . \
    252                 --output-file build/coverage_lib.info
    253         # build and test python
     248        lcov --capture --no-external --directory . --output-file build/coverage_lib.info
    254249        pip install -v -e .
    255         # run tests, with python coverage
    256250        coverage run `which nose2`
    257         # capture coverage again
    258         lcov $(LCOVOPTS) --capture --no-external --directory . \
    259                 --output-file build/coverage_python.info
    260         # merge both coverage info files
    261         lcov $(LCOVOPTS) -a build/coverage_python.info -a build/coverage_lib.info \
    262                 --output-file build/coverage.info
    263         # remove tests
    264         lcov $(LCOVOPTS) --remove build/coverage.info '*/tests/*' '*/ooura_fft8g*' \
    265                 --output-file build/coverage_lib.info
     251        lcov --capture --no-external --directory . --output-file build/coverage_python.info
     252        lcov -a build/coverage_python.info -a build/coverage_lib.info -o build/coverage.info
    266253
    267254# make sure we don't build the doc, which builds a temporary python module
    268255coverage_report: export WAFOPTS += --disable-docs
    269256coverage_report: coverage
    270         # create coverage report dir
    271         mkdir -p build/coverage/
    272         # generate report with lcov's genhtml
    273         genhtml build/coverage_lib.info --output-directory build/coverage/lcov \
    274                 --branch-coverage --highlight --legend
    275         # generate python report with coverage python package
     257        genhtml build/coverage.info --output-directory lcov_html
     258        mkdir -p gcovr_html/
     259        gcovr -r . --html --html-details \
     260                --output gcovr_html/index.html \
     261                --exclude ".*tests/.*" --exclude ".*examples/.*"
    276262        coverage report
    277         coverage html -d build/coverage/coverage
    278         # show links to generated reports
    279         for i in $$(ls build/coverage/*/index.html); do echo file://$(PWD)/$$i; done
     263        coverage html
    280264
    281265sphinx: configure
Note: See TracChangeset for help on using the changeset viewer.