diff --git a/workflow/generate_workflows.sh b/workflow/generate_workflows.sh index a5615a8b0dd..dbd360fda28 100755 --- a/workflow/generate_workflows.sh +++ b/workflow/generate_workflows.sh @@ -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 @@ -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. @@ -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