NOAA-EMC / NCEPLIBS-ncio

This is a NOAA library used by NCEP GSI system to read the GFS forecast files for use in data assimilation.
Other
1 stars 6 forks source link

Upload code coverage using gcovr #49

Closed kgerheiser closed 2 years ago

kgerheiser commented 3 years ago

Fix #48

kgerheiser commented 3 years ago

Something is not right with the html output

kgerheiser commented 3 years ago

I think it's related to all of the include statements. gcovr seems like it's not picking up the correct source files. It's just getting the tst_ncio.f90 file.

edwardhartnett commented 3 years ago

Should this PR be taken down? Or is it still active?

kgerheiser commented 3 years ago

I might be able to find a workaround, but as is the code coverage doesn't work well.

edwardhartnett commented 2 years ago

What's the problem with code coverage here? It seems that the macos build is stuck - is this related to code coverage? Or some other problem?

kgerheiser commented 2 years ago

Take a look at the artifact produced here: https://github.com/kgerheiser/NCEPLIBS-ncio/actions/runs/994758656

The actual code coverage report generated is wrong. It doesn't pick up the source files because they're all included with include().

edwardhartnett commented 2 years ago

Well ain't that a kick in the teeth? The same thing is really messing with the doxygen build as well. (Though I have recently have found an answer there - I've got to try it out...)

One trick I've used in the past is to generate a pre-processed .f90 version of the file, and pass that to the test code coverage. However, isn't the test code coverage tool smart enough to pre-process the fortran code?

Well shoot! I see our files are .f90 - shouldn't they all be .F90? That usually indicates to the tools that the preprocessor needs to be run on the code.

kgerheiser commented 2 years ago

The code here uses include() which is part of the Fortran language, not the pre-processor with #include.

kgerheiser commented 2 years ago

Closing for now