You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++] Use dynamic linking for unit tests, ensure coverage working properly with clang #19765
with a modern gcc (gcc 7.3.0 on Ubuntu 18.04), coverage info is generated properly through .so files (but perhaps the gcc version on Travis is too old?)
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
Activity
asfimport commentedon Oct 9, 2018
Antoine Pitrou / @pitrou:
I started looking into this.
asfimport commentedon Oct 9, 2018
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.
asfimport commentedon Oct 9, 2018
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
asfimport commentedon Oct 9, 2018
Antoine Pitrou / @pitrou:
We already use clang in another CI matrix entries, though, so we may keep gcc for coverage if it works.
asfimport commentedon Oct 9, 2018
Antoine Pitrou / @pitrou:
PARQUET-1420 will probably be a dependency for this.
asfimport commentedon Oct 10, 2018
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
asfimport commentedon Oct 10, 2018
Antoine Pitrou / @pitrou:
I guess that's a good interim compromise, if I manage to make it succeed :)
asfimport commentedon Oct 11, 2018
Wes McKinney / @wesm:
Issue resolved by pull request 2744
#2744