Skip to content

Automatic tests and zerocounter #31

@dlyr

Description

@dlyr

I just try to use CMake-codecov (I'm new to lcov, just learning, so sorry if my question is out of scope)

I want to automatically call check target before calling lcov.
after calling coverage_evaluate() at the end of main CMakeLists.txt, I added add_dependencies(lcov check)
But I have one issue, I want to "zerocounter" lcov data before tests, to have fresh results in case of rebuild.
I have done

add_custom_command(TARGET lcov-zerocounter COMMAND ${LCOV_BIN} --quiet --zerocounter --directory ${CMAKE_BINARY_DIR})
add_dependencies(check lcov-zerocounter)

But I'm asking myself should this be present directly in CMake-codecov ? or is there a better way to handle lcov data cleanup before capture.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions