Update test scripts to be posix compliant#511
Open
ColemanTom wants to merge 1 commit intoNOAA-EMC:developfrom
Open
Update test scripts to be posix compliant#511ColemanTom wants to merge 1 commit intoNOAA-EMC:developfrom
ColemanTom wants to merge 1 commit intoNOAA-EMC:developfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've made some changes to the test scripts to make them shell compliant (or more modern shell). I am making this as it was found building this on OSX led to failures for
run_ipolates_tests.sh.The majority are simple things like
` ... `to$(....)[[ ...to[ ...The bigger changes are to
run_gmerge_tests.shandrun_ipolates_tests.shrun_gmerge_tests.sh
If running as zsh, there is a risk that word splitting won't work properly, so I've redefined args to be using the positional array
@, and use that everywhere. It's the only way I know of which suppoprts all shells.run_ipolates_tests.sh
The named output pipe is BASH specific. I've chanegd to a series of three numbered redirects which gives the same result in this case.
Testing
Before this change, if I change
bashtozshin the ctest setup,run_ipolates_tests.shfails due to the named pipe. Its not posix compliant, but if running as zsh, it fails too as its not a zsh thing. The[[didn't cause issues as they are in most shells anyway.Apparently forcing to zsh can also lead to failures in the gmerge tests which I had not seen before.
After I make this change, whilst forcing to run as zsh, all tests pass