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

Fix cleanup in build-namelist_test.pl #2877

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

samsrabin
Copy link
Collaborator

Description of changes

This PR is intended to fix the failure of build-namelist_test.pl to clean up after itself.

Unfortunately, at the moment it doesn't.

Specific notes

Contributors other than yourself, if any: None

CTSM Issues Fixed:

Are answers expected to change (and if so in what way)? No

Any User Interface Changes (namelist or namelist defaults changes)? No

Does this create a need to change or add documentation? Did you do so? No

Testing performed, if any: Running build-namelist_test.pl.

@samsrabin samsrabin added bug something is working incorrectly next this should get some attention in the next week or two. Normally each Thursday SE meeting. bfb bit-for-bit labels Nov 12, 2024
@samsrabin
Copy link
Collaborator Author

I think the issue has to do with all these calls

eval{ system( "$bldnml -envxml_dir . $options > $tempfile 2>&1 " ); };

which are set up with this at the top:

my $bldnml = "../build-namelist -verbose -csmdata $inputdata_rootdir -configuration clm -structure standard -glc_nec 10 -no-note";
if ( $opts{'test'} ) {
   $bldnml .= " -test";
}

my $tempfile = "temp_file.txt";

Somehow all the options are getting put into the name of the tempfile?

@samsrabin
Copy link
Collaborator Author

The files are created here, in the copyfiles subroutine:

foreach my $file ( @$filesref ) {
system( "/bin/cp $confdir/$file ${file}.${mode}.${type}" );
$$diffref{${mode}}{${type}}{$file} = 1;

@wwieder wwieder removed the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Nov 14, 2024
@wwieder
Copy link
Contributor

wwieder commented Nov 14, 2024

Simple update here, but ultimately we want to get rid of the .pl, as this is something that's harder than @samsrabin appreciated here. Will need @ekluzek to fix this as a quality of life improvement.

@wwieder wwieder added code health improving internal code structure to make easier to maintain (sustainability) usability Improve or clarify user-facing options labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bfb bit-for-bit bug something is working incorrectly code health improving internal code structure to make easier to maintain (sustainability) usability Improve or clarify user-facing options
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build-namelist_test.pl fails to clean up
3 participants