Improve run_sys_tests behavior when baseline directories already exist
- 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
Assessment
This issue has not been assessed yet.