Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't test sinv utility with one argument via ctest #392

Closed
jbathegit opened this issue Mar 17, 2023 · 3 comments
Closed

can't test sinv utility with one argument via ctest #392

jbathegit opened this issue Mar 17, 2023 · 3 comments
Labels
test Testing is important!

Comments

@jbathegit
Copy link
Collaborator

The sinv utility can be called with either one argument or two. The first argument is always the BUFR file to be read, and the second one is optional containing the directory location of the master tables. If the user only passes in one argument, then the utility defaults to the directory location of the master tables when the library was installed.

The problem is that, when doing a build, we always run "ctest" before we run "make install", and the latter step is where the master tables actually get installed into their default directory location, so they're not available there when "ctest" is run, and therefore we can't test calling the sinv utility with only one argument in test/testscripts/test_sinv.sh. I've noted this in a comment in that script, and for now it means we won't be able to achieve 100% gcovr testing coverage of the sinv source code.

BTW, and once "make install" is run, then the sinv utility can be called with just one argument and it works correctly. Again, we just can't include this as a test case when we run "ctest", since the "make install" hasn't occurred yet.

@edwardhartnett
Copy link
Contributor

I believe we will just live with this, at least until we achieve a much higher level of testing elsewhere. I think you can close this issue.

@edwardhartnett edwardhartnett added the test Testing is important! label Mar 26, 2023
@jbathegit
Copy link
Collaborator Author

Thanks, but I'd like to leave it open, just to help us remember that this does need to be addressed at some point.

@edwardhartnett
Copy link
Contributor

Well I don't think there is any solution to this except to change sinv so that it can read some initialization file to find the location of the master tables. If so such sinv intialization file is available, then it defaults to the usual location of the master tables.

Then, for testing, you have the sinv initialization file present, and have it point to master tables in your test directory. These can be used to fully test sinv before make install. Then, you install, but you don't install the sinv initialization file. Now sinv will always look for the master tables in the default location.

Just a thought...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Testing is important!
Projects
None yet
Development

No branches or pull requests

2 participants