Fastcov Versions Save

A massively parallelized gcov wrapper

v1.14

2 years ago

Minor. bug fixes

  • Update to use longform flags when invoking gcov: this is to avoid problems with the --json-format shortform option. Starting with GCC11, -i is deprecated in favor of -j, so using longform avoids future option compatibility issues
  • Fix issue where passing --zerocounters and --process-gcno simultaneously resulted in deletion of the gcno files

v1.13

2 years ago

Misc. bug fixes and performance improvements

  • Skip v1.12 because tag already exists and Travis CI/CD won't re-trigger a tag that has triggered it
  • Made exclusion marker scanning much more efficient:
    • fastcov will do a preliminary scan to see if even a single marker is in the file before processing it; otherwise it early exits
    • fastcov now spawns multiple processes to scan for exclusion markers instead of multiple threads
    • This should result in significant speed gains if a) you have a lot of cores, b) you have a lot of source files
    • Otherwise you probably won't notice
  • Fixed issue where fastcov sometimes crashes if gcov is fed an empty gcno/gcda file
    • Fastcov no longer crashes and will instead skip those source files, print an error, and exit with status code 8

v1.11

3 years ago
  • Fixed an issue where gcov crashing or being killed causes fastcov to hang forever blocking on a queue

v1.10

3 years ago

Note that v1.9 was skipped because the PyPI uploaded package was incorrect. This release adds a few utilities that are complementary to fastcov. They are located in the utils/ directory, and like fastcov, are single source python scripts that can be copied from this repository and runned directly. Alternatively, installing the latest version of fastcov using pip will also install these utilities. Here is a brief description of what each utility does:

  • utils/fastcov_summary.py

This utility will summarize a provided fastcov JSON file similar to the way genhtml summarizes a given lcov info file. Additionally, flags can be passed that check if a certain coverage threshold is met for function, line, or branch coverage.

This script is useful for 2 purposes. It can be used to print out a coverage summary on the command line for a CI system to parse using regex (such as GitLab CI, for example). This script can also be used to fail builds if (for example) line coverage drops below a certain percentage.

  • utils/fastcov_to_sonarqube.py

This script will convert a provided fastcov JSON file to the Sonar generic test coverage XML format.

v1.8

3 years ago

Misc. bug fixes and features, special thanks to @rburtnykx

Description:

  • Fixed stdout redirection issue (sys.stdout.encoding is None)
  • Fastcov now uses compile base directory from gcov json by default
  • --dump-statistic can now be used to dump coverage statistics of the processed file(s)
  • --validate-sources can now be used to assert all source files exist
  • --diff-filter and --diff-base-dir can be used to apply a unified diff file to a coverage report
  • Default output file name uses .info if --lcov is passed, .json otherwise.

v1.7

3 years ago

Description:

  • Fix #48, #53
  • Fix reported info metrics
  • Filter options, exclusion marker scanning can now apply during combine operations
  • Allow LCOV_EXCL markers to filter function coverage
  • Shift exit codes to start at 3 (slight break in backwards compatibility if switching on exit code values)
    • This is because 1-2 have special meaning for a lot of shells
  • Add new exit code (6) for exclusion scan failure

v1.6

4 years ago

Description:

  • Fix #43 (reduce memory footprint of fastcov)
  • Refactor GCDA processing to use multiprocessing.Process instead of threading (should result in 15%+ speedup on larger projects since each gcda worker can now bypass GIL and leverage additional cpu resources)
  • When branch lists mismatch, overlay smaller list on bigger list
  • Add option --skip-exclusion-markers to skip the step where fastcov scans source files for exclusion markers
  • Add SPDX license id and url

v1.5

4 years ago

Description:

  • Fix #32, #37, #39, #41
  • Remove mutual exclusion for file filtering flags
  • Fix potential IndexError that could occur if both including and excluding branches
  • Remove support for gcov-json output (nobody uses it)
  • Enhance fastcov json format to support lcov test names. This causes a slight break in backwards-compatibility but I doubt anyone will notice since most people use lcov info format.
  • Add --test-name CLI option (equivalent to lcov's -t) to support test names (i.e. for use with genhtml --show-details)
  • Add --add-tracefile CLI option (equivalent to lcov's -a) to support coverage combine operations (i.e. for use with genhtml --show-details)
  • Add --verbose CLI option which prints more debug details (i.e. which coverage files are being skipped/filtered, and why)

v1.4

4 years ago

Description:

  • Fix #17
  • Fix #33
  • This release could cause some slightly different filtering behavior depending on CMake build system type you are using.
  • This release standardizes filtering to always use absolute paths so that the filtering behavior when using Make vs. Ninja builds are the same.

v1.3

4 years ago

Description:

  • Fix #28
  • Add ability to process gcno files in addition to gcda files by passing --process-gcno
  • This flag essentially includes all instrumented sources files in the coverage report, not just ones under test.