-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
BUG: Fix path to write itkNiftiImageIOTest14 data #4642
BUG: Fix path to write itkNiftiImageIOTest14 data #4642
Conversation
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.
@cookpa thanks for the follow-up 🙏
Actually I realize this might still not work
Because it assumes a path separator is at the end of test_dir. Other tests use
I think I will do that as well to avoid the potential for other problems with the bad working directory |
If it is possible to pass in full paths to the test as args, that generally avoids issues. |
@thewtex is it OK for me to use a forward slash, like
|
Yes, Windows supports forward slashes in file paths. |
One unrelated change in this last commit: while running in verbose mode to look into the path issue, I noticed the metadata wasn't being checked correctly. The metadata is correct - it just would not have failed the test if it was wrong. I also figured out that the |
One more change, I added a line to throw the exception if the nifti file cannot be read in. That might shed more light on the failure. |
NOTE: "/a_blatantly_obvious/bad_file_path/that/should/never/exist/on/the/computer/" is purposfully not supposed to exist. It is a path that is used to test proper behavior when a path does not exist. |
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.
Thanks for fixing this so quickly @cookpa.
Left an inline comment.
I think this is ready now, I can rebase if needed but I think admins can squash and merge directly now |
Also throw exception if NiftiIOTest14 fails to read file.
c63d10b
to
21b74f0
Compare
Hi @thewtex I was going to make the path change as suggested by @blowekamp but I see you've got other things going on with this PR. I think it will work as-is, so happy to leave it be if that makes things easier. |
Hi @cookpa , yes if you could please make that improvement in a follow-up PR, it will be appreciated. I will merge this now so we can get clean builds for other PRs. |
Fixes a test failure introduced by #4595
@jhlegarreta, this works on my machine, but then so did the previous test. According to the error message here
https://open.cdash.org/tests/1540861560
It looks like a previous test somehow set the working directory to
/a_blatantly_obvious/bad_file_path/that/should/never/exist/on/the/computer/
. But I could not locate where this might have happened.My mistake was to not include the test directory (passed to the test as
${ITK_TEST_OUTPUT_DIR}
) in my output file name. I fixed the test to write to the full path.PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.