Skip to content

TST: reorder duplicate mem_overlap.c compile - #11849

Merged
charris merged 1 commit into
numpy:masterfrom
tylerjereddy:issue_11790_gcov
Aug 31, 2018
Merged

charris merged 1 commit into
numpy:masterfrom
tylerjereddy:issue_11790_gcov

Conversation

@tylerjereddy

@tylerjereddy tylerjereddy commented Aug 31, 2018 •

Copy link
Copy Markdown
Contributor

Fixes #11790

mem_overlap.c was being recompiled to build a C test extension after mem_overlap.c was already compiled by the C extension it is testing. This PR switches the order of compilation--build the test extension first, and then the library, so that gcov runs on source files that match the building of the library files, not the files that are testing them.

A better design might eventually avoid requiring the diophantine code from mem_overlap to be used in the test file itself--i.e., find a way to probe the code paths in the library without reusing that dependency.

* _multiarray_tests unfortunately recompile a
shared dependency of the extension they are
testing, causing gcov to flag the timestamp
differential; the shared dependency remains
but the extension is now built AFTER the
tests are compiled so that the timestamps
match expectations for gcov
@charris

charris commented Aug 31, 2018

Copy link
Copy Markdown
Member

What is it about gcov that makes this work?

@charris
charris merged commit 6c1b6e4 into numpy:master Aug 31, 2018
@charris

charris commented Aug 31, 2018

Copy link
Copy Markdown
Member

Thanks Tyler.

@tylerjereddy
tylerjereddy deleted the issue_11790_gcov branch August 31, 2018 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants