Skip to content

[C++] Use dynamic linking for unit tests, ensure coverage working properly with clang #19765

Closed

Description

@asfimport

See experience around this in Apache Kudu
apache/kudu@48799d3

Reporter: Wes McKinney / @wesm
Assignee: Antoine Pitrou / @pitrou

PRs and other links:

Note: This issue was originally created as ARROW-3442. Please see the migration documentation for further details.

Activity

  1. asfimport commented on Oct 9, 2018

    @asfimport
    Author

    Antoine Pitrou / @pitrou:
    I started looking into this.

  2. asfimport commented on Oct 9, 2018

    @asfimport
    Author

    Antoine Pitrou / @pitrou:
    Ok, it seems coverage works fine with the gcc version on Travis too. See example stats here:
    https://travis-ci.org/pitrou/arrow/jobs/439186839#L3865

    I think the reference in CMakeLists.txt to https://stackoverflow.com/questions/28164543/using-gcov-flush-within-a-library-doesnt-force-the-other-modules-to-yield-gc is a red herring: that SO question is about the case where you want to cover a daemon that gets abruptly killed. When a test file exits gracefully, coverage info seems flushed properly for all compilation units.

  3. asfimport commented on Oct 9, 2018

    @asfimport
    Author

    Wes McKinney / @wesm:
    See the llvm gcov wrapper in Kudu https://github.com/apache/kudu/blob/master/build-support/llvm-gcov-wrapper. I think we should use clang for the coverage, since Clang also gives us higher quality warning checks

  4. asfimport commented on Oct 9, 2018

    @asfimport
    Author

    Antoine Pitrou / @pitrou:
    We already use clang in another CI matrix entries, though, so we may keep gcc for coverage if it works.

  5. asfimport commented on Oct 9, 2018

    @asfimport
    Author

    Antoine Pitrou / @pitrou:
    PARQUET-1420 will probably be a dependency for this.

  6. asfimport commented on Oct 10, 2018

    @asfimport
    Author

    Wes McKinney / @wesm:
    I think we can use dynamic linking for all unit tests that do not require access to non-exported symbols. If there are couple unit tests that use static linking I think that's ok

  7. asfimport commented on Oct 10, 2018

    @asfimport
    Author

    Antoine Pitrou / @pitrou:
    I guess that's a good interim compromise, if I manage to make it succeed :)

  8. asfimport commented on Oct 11, 2018

    @asfimport
    Author

    Wes McKinney / @wesm:
    Issue resolved by pull request 2744
    #2744

  9. added this to the 0.12.0 milestone on Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions