-
Notifications
You must be signed in to change notification settings - Fork 176
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
CI JJOB Tests using CMake #3214
base: develop
Are you sure you want to change the base?
CI JJOB Tests using CMake #3214
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ShellCheck found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
mkdir: | ||
- "{{RUNTESTS}}/COMROOT/{{ TEST_NAME }}//gfs.{{PDY}}/{{HH}}/model/atmos/input" | ||
copy: | ||
- ["{{ STAGED_FUNCTIONAL_TEST_DIR }}/{{ TEST_NAME }}/gfs.{{ PDY }}/{{ HH }}/model/atmos/input/gfs_ctrl.nc", "{{RUNTESTS}}/COMROOT/{{ TEST_NAME }}//gfs.{{PDY}}/{{HH}}/model/atmos/input/gfs_ctrl.nc"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ["{{ STAGED_FUNCTIONAL_TEST_DIR }}/{{ TEST_NAME }}/gfs.{{ PDY }}/{{ HH }}/model/atmos/input/gfs_ctrl.nc", "{{RUNTESTS}}/COMROOT/{{ TEST_NAME }}//gfs.{{PDY}}/{{HH}}/model/atmos/input/gfs_ctrl.nc"] | |
- ["{{ STAGED_FUNCTIONAL_TEST_DIR }}/{{ TEST_NAME }}/gfs.{{ TEST_DATE | to_YMD }}/{{ HH }}/model/atmos/input/gfs_ctrl.nc", "{{RUNTESTS}}/COMROOT/{{ TEST_NAME }}//gfs.{{PDY}}/{{HH}}/model/atmos/input/gfs_ctrl.nc"] |
- "{{RUNTESTS}}/COMROOT/{{ TEST_NAME }}//gfs.{{PDY}}/{{HH}}/model/atmos/input" | ||
copy: | ||
- ["{{ STAGED_FUNCTIONAL_TEST_DIR }}/{{ TEST_NAME }}/gfs.{{ PDY }}/{{ HH }}/model/atmos/input/gfs_ctrl.nc", "{{RUNTESTS}}/COMROOT/{{ TEST_NAME }}//gfs.{{PDY}}/{{HH}}/model/atmos/input/gfs_ctrl.nc"] | ||
- ["{{ STAGED_FUNCTIONAL_TEST_DIR }}/{{ TEST_NAME }}/gfs.{{ PDY }}/{{ HH }}/model/atmos/input/gfs_data.tile1.nc", "{{RUNTESTS}}/COMROOT/{{ TEST_NAME }}//gfs.{{PDY}}/{{HH}}/model/atmos/input/gfs_data.tile1.nc"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ["{{ STAGED_FUNCTIONAL_TEST_DIR }}/{{ TEST_NAME }}/gfs.{{ PDY }}/{{ HH }}/model/atmos/input/gfs_data.tile1.nc", "{{RUNTESTS}}/COMROOT/{{ TEST_NAME }}//gfs.{{PDY}}/{{HH}}/model/atmos/input/gfs_data.tile1.nc"] | |
- ["{{ STAGED_FUNCTIONAL_TEST_DIR }}/{{ TEST_NAME }}/gfs.{{ PDY }}/{{ TEST_DATE | strftime('%H') }}/model/atmos/input/gfs_data.tile1.nc", "{{RUNTESTS}}/COMROOT/{{ TEST_NAME }}//gfs.{{PDY}}/{{HH}}/model/atmos/input/gfs_data.tile1.nc"] |
@@ -0,0 +1,17 @@ | |||
input_files: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
input_files: | |
{% set RUNTESTS = RUNTESTS | getenv %} | |
input_files: |
something like this if one needs test specific local info. For e.g. in the DA jobs, we will need prior dates that are 6 hours behind TEST_DATE
.
ci/ctests/CMakeLists.txt
Outdated
|
||
AddFunctionalTest( | ||
CASE "C48_ATM" | ||
JOB "gfs_fcst_seg0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JOB "gfs_fcst_seg0" | |
JOB "gfs_fcst_seg0" | |
DATE "2020011200" # Test date |
…CMakeLists.txt to use PROJECT_SOURCE_DIR for HOMEgfs in templiting bash wrapper sripts
rm -f ./*.db | ||
rm -f ./jobcard | ||
|
||
job_card=$(yes | "${rocotoboot_dryrun}" -d "${TEST_NAME}.db" -w "${TEST_NAME}.xml" -v 10 -c "${idate}00" -t "${JOB}" 2> jobcard) || true |
Check warning
Code scanning / shellcheck
job_card appears unused. Verify use (or export if used externally). Warning
rm -f ./jobcard | ||
|
||
job_card=$(yes | "${rocotoboot_dryrun}" -d "${TEST_NAME}.db" -w "${TEST_NAME}.xml" -v 10 -c "${idate}00" -t "${JOB}" 2> jobcard) || true | ||
cat jobcard | sed '/^{{\|^}}/d' | sed '1d' > "${TEST_NAME}.sub" || true |
Check notice
Code scanning / shellcheck
Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. Note
TEST_NAME=${1:?"Name of the test is required"} | ||
|
||
# CMake to fill these variables | ||
STAGED_FUNCTIONAL_TEST_DIR="@STAGED_FUNCTIONAL_TEST_DIR@" |
Check warning
Code scanning / shellcheck
STAGED_FUNCTIONAL_TEST_DIR appears unused. Verify use (or export if used externally). Warning
|
||
# CMake to fill these variables | ||
STAGED_FUNCTIONAL_TEST_DIR="@STAGED_FUNCTIONAL_TEST_DIR@" | ||
RUNTESTS="@RUNTESTS@" |
Check warning
Code scanning / shellcheck
RUNTESTS appears unused. Verify use (or export if used externally). Warning
|
||
TEST_NAME=${1:?"Name of the test is required"} | ||
YAML_FILE=${2:?"Name of the CI yaml file for the test"} | ||
TEST_DATE=${3:?"idate of the test is required"} |
Check warning
Code scanning / shellcheck
TEST_DATE appears unused. Verify use (or export if used externally). Warning
Description
Adding CI tests at the JJOB level using CMake/ctest wrappers:
These individual JJOB tests have four distinct phases:
${HOMEgfs}/ci/ctest/cases/{CASE}_{JJOB}.yaml
Resolves #3204
Type of change
Change characteristics
How has this been tested?
Ran with CMake/ctest:
Checklist