-
Notifications
You must be signed in to change notification settings - Fork 50
Fix split-vars tests #355
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
Fix split-vars tests #355
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,10 @@ fi | |
|
|
||
| . ${srcdir=.}/init.sh; path_prepend_ ../src | ||
|
|
||
| # Set paths to list-vars script and just-compiled exec | ||
| export LIST_NCVARS=`find ../.. -name list_ncvars.sh` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These should be added to the Makefile.am where the test environment is defined, not here.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is true for all other files. PR #338 has a fix for the |
||
| export PKGLIBEXECDIR=$(dirname $LIST_NCVARS) | ||
|
|
||
| # Use the test netCDF files from plevel and timeavg | ||
| ${builddir=.}/create_timeavg_test_ncfiles || framework_failure_ "failed to create timeavg test files" | ||
| ${builddir=.}/create_plevel_test_ncfile || framework_failure_ "failed to create plevel test files" | ||
|
|
@@ -43,4 +47,4 @@ split_ncvars.pl test_input_*.nc || fail_ split_ncvars.pl multiple input files fa | |
| test -f var1.nc || fail_ var1.nc not created with multiple input files | ||
| test -f var2.nc || fail_ var2.nc not created with multiple input files | ||
| # Verify there are 60 time steps | ||
| ncdump -h var1.nc | grep -q '60 currently' || fail_ var1.nc does not have 60 time steps | ||
| ncdump -h var1.nc | grep -q '60 currently' || fail_ var1.nc does not have 60 time steps | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test scripot is required to ensure this line does what you expect.
Also, only testing if the file exists is not sufficient. You do need to verify the command runs. It would be easier to verify that the command ran successfully in the location where the command is run in this script than just trying to figure out if the command exits and is executable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much. I that checking the exit status would be better than this check, and I'll do that in a separate PR.