Skip to content
Closed
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion .cicd/scripts/post_test_results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ function post_test() {

git add tests/logs/RegressionTests_${machine,,}.log
git status
git commit -m "[AutoRT] ${machine} Job Completed.\n\n\n on-behalf-of @ufs-community <ecc.platform@noaa.gov>"

##Check regression test logs results
if grep -q "Result: SUCCESS" ${UFS_MODEL_DIR}/tests/logs/RegressionTests_${machine,,}.log && grep -q "status=0" ${UFS_MODEL_DIR}/tests/logs/${machine,,}-status; then
git commit -m "[AutoRT] ${machine} Job Completed Successfully.\n\n\n on-behalf-of @ufs-community <ecc.platform@noaa.gov>"
else
git commit --allow-empty -m "[AutoRT] ${machine} Job Failed! \n\n\n on-behalf-of @ufs-community <ecc.platform@noaa.gov>"
fi

SSH_ORIGIN=$(curl --silent "https://api.github.com/repos/ufs-community/ufs-weather-model/pulls/${CHANGE_ID}" | jq -r '.head.repo.ssh_url')
git remote -v | grep -w sshorigin > /dev/null 2>&1 && git remote remove sshorigin > /dev/null 2>&1
Expand Down
7 changes: 6 additions & 1 deletion .cicd/scripts/wm_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ if [[ ${WM_REGRESSION_TESTS} = true ]] ; then

cd ${workspace}
find ${workspace}/tests/logs -ls
echo "Pipeline Reqression Tests on ${UFS_PLATFORM} complete. status=${status}"
###Fail case check if no test logs were completed move old file back.
if [[ ! -f "tests/logs/RegressionTests_${UFS_PLATFORM}.log" && -f "tests/logs/RegressionTests_${UFS_PLATFORM}.log.orig" ]];then
mv tests/logs/RegressionTests_${UFS_PLATFORM}.log.orig tests/logs/RegressionTests_${UFS_PLATFORM}.log
fi

echo "Pipeline Reqression Tests on ${UFS_PLATFORM} complete. status=${status}" | tee ${workspace}/${UFS_PLATFORM}-status
else
echo "Pipeline Regression Tests on ${UFS_PLATFORM} (${machine}) skipped."
echo "ExperimentName: null" > ${workspace}/wm_test_results-${UFS_PLATFORM}-${UFS_COMPILER}.txt
Expand Down