Closed edwardhartnett closed 1 year ago
A question, and assuming I'm understanding correctly that your intent here is to have one add_test()
for each utility which does nothing more than run the script, and where the script itself then does one or more runs of the actual utility for various cases...
Will gcovr still properly track code coverage for all such utilities? In other words, if multiple runs of the utility are now being done inside of a single script kicked off by a single add_test()
(vs. each run of the utility being kicked off by its own separate add_test()
), will gcovr still track everything the same way?
Yes, gcovr somehow figures it all out and still works.
This is how we run tests in netcdf-c, netcdf-fortran, PIO, and many other projects.
I believe this is done so I will close this issue.
It's not quite done yet. I just finished the test updates for the remaining utilities (cmpbqm, readbp, and readmp) and will push up a new PR soon.
Press on!
The util tests can be considerably simplified. For example, we have test_binv.sh, which contains:
This is then used in the cmake file like this:
This could all be replaced by one line of script code which runs the binv test with the arguments. If any aspects of the shell script need to be set at configure time, then we use test_binv.sh.in.
The cmake file should run the binv test script without providing any test details, those can be in the script file.
We need to add tests to the binv test script. Want the build script to contain all the testing details, for simple debugging.
It would be good if this could be done soon, so that we can proceed to test all utilities more thoroughly.