Skip to content

Commit

Permalink
Add --allow-baseline-skip option to create_test.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsrabin committed Jan 17, 2025
1 parent 19df4fa commit 7fe8120
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CIME/hist_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def _generate_baseline_impl(case, baseline_dir=None, allow_baseline_overwrite=Fa

if os.path.isdir(os.path.join(basegen_dir, testcase)):
if allow_baseline_skip:
return False, " Skipping"
return True, " Skipping"
if not allow_baseline_overwrite:
expect(False, " Cowardly refusing to overwrite existing baseline directory")

Expand Down
3 changes: 3 additions & 0 deletions CIME/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ def __init__(
clear_folder(os.path.join(test_baseline, "CaseDocs"))
else:
clear_folder(test_baseline)
print(f"allow_baseline_overwrite: {allow_baseline_overwrite}")
print(f"len(existing_baselines): {len(existing_baselines)}")
print(f"allow_baseline_skip: {allow_baseline_skip}")
expect(
allow_baseline_overwrite or len(existing_baselines) == 0 or allow_baseline_skip,
"Baseline directories already exists {}\n"
Expand Down

0 comments on commit 7fe8120

Please sign in to comment.