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

Prevent duplicate case generation in generate_workflows.sh #3217

Merged
merged 4 commits into from
Jan 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions workflow/generate_workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ function _usage() {
directory up from this script's residing directory.

-b Run build_all.sh with default flags
(build the UFS, UPP, UFS_Utils, and GFS-utils only
(build the UFS, UPP, UFS_Utils, and GFS-utils only)

-u Update submodules before building and/or generating experiments.

-y "list of YAMLs to run"
If this option is not specified, the default case (C48_ATM) will be
run. This option is overidden by -G or -E (see below).
run. This option is incompatible with -G, -E, or -S.
Example: -y "C48_ATM C48_S2SW C96C48_hybatmDA"

-Y /path/to/directory/with/YAMLs
Expand All @@ -43,7 +43,6 @@ function _usage() {
Run all valid SFS cases in the specified YAML directory.

NOTES:
- Only one of -G -E or -S may be specified
- Valid cases are determined by the experiment:system key as
well as the skip_ci_on_hosts list in each YAML.

Expand Down Expand Up @@ -223,6 +222,22 @@ else
done
fi

# Empty the _yaml_list array if -G, -E, and/or -S were selected
if [[ "${_run_all_gfs}" == "true" || \
"${_run_all_gefs}" == "true" || \
"${_run_all_sfs}" == "true" ]]; then

# Raise an error if the user specified a yaml list and any of -G -E -S
if [[ "${_specified_yaml_list}" == "true" ]]; then
echo "Ambiguous case selection."
echo "Please select which tests to run explicitly with -y \"list of tests\" or"
echo "by specifying -G (all GFS), -E (all GEFS), and/or -S (all SFS), but not both."
exit 3
fi

_yaml_list=()
fi

# If -S is specified, exit (for now).
# TODO when SFS tests come online, enable this option.
if [[ "${_run_all_sfs}" == "true" ]]; then
Expand Down
Loading