[coverage] Remove subtrees and benchmarks from coverage report #10565

pull achow101 wants to merge 3 commits into bitcoin:master from achow101:lcov-remove-extra changing 4 files +71 −29
  1. achow101 commented at 2:13 AM on June 9, 2017: member

    Removes stats about leveldb, univalue, and benchmark coverage from the coverage reports. Since we don't test these three items specifically and thus don't care about test coverage for these items.

    This builds on top of #10511 to use the faster lcov -r replacement.

  2. Have `make cov` optionally include branch coverage statistics
    Added an option to configure to allow for branch coverage statistics gathering.
    
    Disabled logprint macro when coverage testing is on so that unnecessary branches are not analyzed.
    c8914b9dbb
  3. fanquake added the label Docs and Output on Jun 9, 2017
  4. sipa commented at 2:36 AM on June 9, 2017: member

    Perhaps remove all the subtrees... including src/crypto/ctaes and src/secp256k1?

  5. achow101 force-pushed on Jun 9, 2017
  6. achow101 renamed this:
    [coverage] Remove leveldb, univalue, and benchmarks from coverage report
    [coverage] Remove subtrees and benchmarks from coverage report
    on Jun 9, 2017
  7. achow101 commented at 5:40 PM on June 9, 2017: member

    Removed ctaes and secp256k1 too.

  8. achow101 force-pushed on Jun 9, 2017
  9. in contrib/filter-lcov.py:22 in 05f0cdff48 outdated
      17 | +    with open(outfile, 'w') as wf:
      18 | +        for line in f:
      19 | +            for p in pattern:
      20 | +                if line.startswith("SF:") and p in line:
      21 | +                    in_remove = True
      22 | +                if not in_remove:
    


    sipa commented at 6:59 PM on June 9, 2017:

    This line should probably not be inside the for p in pattern: loop, as it may result in multiple writes of the same input line.

  10. achow101 force-pushed on Jun 9, 2017
  11. Replace lcov -r commands with faster way
    Instead of using lcov -r (which is extremely slow), first use a python script to perform bulk cleanup of the /usr/include/* coverage. Then use lcov -a to remove the duplicate entries. This has the same effect of lcov -r but runs significantly faster
    405b86a92a
  12. achow101 force-pushed on Jun 9, 2017
  13. laanwj commented at 9:07 AM on June 12, 2017: member

    Concept ACK

  14. Filter subtrees and and benchmarks from coverage report
    Remove leveldb baseline coverage gathering.
    
    Added filter rules to remove all of the subtress (leveldb, secp256k1, ctaes, univalue) and
    benchmarking from the coverage report. These items are unnecessary as we do not test for any
    of the subtrees and benchmark coverage is unneeded.
    d5711f4a2d
  15. in Makefile.am:174 in 786b4a1384 outdated
     170 | @@ -171,44 +171,32 @@ baseline.info:
     171 |  	$(LCOV) -c -i -d $(abs_builddir)/src -o $@
     172 |  
     173 |  baseline_filtered.info: baseline.info
     174 | -	$(abs_builddir)/contrib/filter-lcov.py "/usr/include/" $< $@
     175 | +	$(abs_builddir)/contrib/filter-lcov.py -p "/usr/include/" -p "src/leveldb/" -p "src/bench/" -p "src/univalue" -p "src/crypto/ctaes" -p "src/secp256k1" $< $@
    


    sipa commented at 10:26 PM on June 12, 2017:

    Perhaps abstract out the list of things to filter into a variable, as it's used more than once?


    achow101 commented at 10:53 PM on June 12, 2017:

    done

  16. achow101 force-pushed on Jun 12, 2017
  17. sipa commented at 1:41 AM on June 13, 2017: member

    Tested ACK d5711f4a2d59adc45755b13e3776b9d36e1c55f5

  18. laanwj merged this on Jun 22, 2017
  19. laanwj closed this on Jun 22, 2017

  20. laanwj referenced this in commit 8c2098ad12 on Jun 22, 2017
  21. PastaPastaPasta referenced this in commit 55bfb5f6b9 on Jul 6, 2019
  22. PastaPastaPasta referenced this in commit 3b772eea1f on Jul 8, 2019
  23. PastaPastaPasta referenced this in commit a47c7f0225 on Jul 9, 2019
  24. PastaPastaPasta referenced this in commit 3f4d08d36a on Jul 11, 2019
  25. barrystyle referenced this in commit d4e727701e on Jan 22, 2020
  26. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 00:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me