-
Notifications
You must be signed in to change notification settings - Fork 212
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
The testmod includes directories concatenation for shell_commands files only add the shell_commands files after the first two include directories #4709
Comments
It looks to me that this is in the apply_user_mods subroutine in: CIME/user_mod_support.py It could also be in the calls to it in case.py and case_clone.py. If we do find issues here, we should add more unit testing for this in: |
I think it still updates the case with the behavior from the first two, but it doesn't add them to the final shell_commands file for the final test case. |
@ekluzek - based on my understanding from reading back through ESCOMP/CTSM#2037 and from re-examining the code in user_mod_support.py, I think the current expected behavior is:
Does this description match what you're seeing? If you want a file containing a record of all shell_commands that have been executed, my suggestion is this: ESCOMP/CTSM#2037 (comment) - i.e., create a new file that contains a record of everything that has been executed in shell_commands. I think this will be easy and safe to do: by creating a new file that is just for documentation purposes, we won't run any risk of changing logic or breaking some weird cases. It's possible that we'd end up with extra copies of commands in some circumstances (I'm not sure what circumstances, but there may be some), but if so I think that would be because the given shell commands have actually been executed multiple times in those circumstances, so having them appear multiple times in the documentation file actually feels correct. Alternatives that feel less appealing:
I can see an argument that the suggestion in ESCOMP/CTSM#2037 (comment) could lead to a confusing situation of having two similar-but-different files. So actually one improvement on this would be: After copying the contents of shell_commands into shell_commands_all_testmods, remove shell_commands. So in the end, all that would be left would be shell_commands_all_testmods. (With a bit more rework, we could even keep this called shell_commands. That would require changing the "working" file to be called something different, like shell_commands_temp.) |
When a testmod is setup with several include directories, the shell_commands files don't all get added to the resulting final final in the case created for the final test. It only adds the shell_commands files for the testmod includes after the first two directories.
The CTSM issue regarding this is here...
ESCOMP/CTSM#2037
I found this behavior in this CTSM PR:
ESCOMP/CTSM#2888
This is in cime6.1.37, but we have seen this for long before that.
The text was updated successfully, but these errors were encountered: