ENH: Added coverage, gcov and generate-lcov-html flags in spin test#24992
ENH: Added coverage, gcov and generate-lcov-html flags in spin test#24992ganesh-k13 wants to merge 1 commit into
coverage, gcov and generate-lcov-html flags in spin test#24992Conversation
coverage flag in testcoverage flag in spin test
|
Ah yes, that's possible. But I was thinking from |
|
Hey @ganesh-k13 do you have any followup for this? I'd like to bring it in and also add support for generating C coverage via |
|
Hey @ngoldbaum , I'd be happy to add |
|
That'd be really useful. It would be nice to be able to generate a coverage report locally for both C and python. |
coverage flag in spin testcoverage flag in spin test
d5aa8ec to
6489ba7
Compare
ganesh-k13
left a comment
There was a problem hiding this comment.
I'm not sure if I'm doing something wrong here, the .gcda generated from old runtest.py is of the format:
./build/temp.linux-x86_64-3.10/build/src.linux-x86_64-3.10/numpy/core/src/umath/matmul.gcda
while the new one looks like:
./build/numpy/_core/_multiarray_umath.cpython-310-x86_64-linux-gnu.so.p/meson-generated_matmul.c.gcda
This means lcov is not working as expected. I'll take a look at this tomorrow, something off with the flags I'm guessing.
|
CI builds will fail till scientific-python/spin#146 is merged and released, I'll move it ready for review so it does not go stale. |
Ohh I understood this statement now @stefanv . I have made the changes to reflect that via |
coverage flag in spin testcoverage, gcov and generate-lcov-html flags in spin test
|
This is currently blocked on #26977 as the spin changes needed for |
|
I think we can update spin now in CI, we were waiting on spin 0.11 to do that and it's out now. |
|
@ganesh-k13 Now that we're on spin 0.13, do you want to take another look at this? |
|
Thanks @stefanv! I'll get the PR working this week. |
c76a1bf to
e894f97
Compare
- `coverage` - `gcov` - `generate-lcov-html`
e894f97 to
f555c8f
Compare
|
Is anything here NumPy-specific, or in other words can this at some stage be migrated to spin itself so more people can use it? |
|
I thought the same thing and started testing this out in my local |

Changes
coverageflag intestExample
In Spin, after merging of scientific-python/spin#146:
spin test --coverage --gcovspin test --generate-lcov-htmlOther error handling
spin buildspin test --generate-lcov-htmlNotes
related #24080, scientific-python/spin#100
depends on scientific-python/spin#146