ESCOMP / ESCOMP/CTSM

Improve run_sys_tests behavior when baseline directories already exist

Open
#2,099 3 comments 1 reaction 0 assignees View on GitHub
enhancement test: python
Dominant language
Fortran
Stars
352
Forks
361
Avg merge
6d 6h
Merged PRs (30d)
8

Description

When a user does `run_sys_tests ... --generate /some/existing/directory`, the submission seems to work (i.e., that command succeeds). However, any test whose baseline already exists there will fail, with the `STDERR` file saying `Use -o to avoid this error`. That message is from `cime/scripts/create_test.py`, but this isn't obvious to the user, who may then try `run_sys_tests ... --generate /some/existing/directory -o`. This doesn't work, as `-o` isn't an accepted option of `run_sys_tests`.

I think it would be better to handle this sort of situation upon the call of `run_sys_tests` itself.

Possible mitigations:
1. ~~Throw an error if the directory specified by `--generate` already exists.~~ This would be really annoying in the case where the user is only running tests whose baselines don't already exist there, so I don't consider it a real option.
2. Add `-o` as an option of `run_sys_tests`. We may not _want_ to allow this, though, as it could be unintentionally destructive.
3. As 2, but print the baselines that already exist and ask for confirmation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.