diff --git a/.cicd/scripts/post_test_results.sh b/.cicd/scripts/post_test_results.sh index b36aaa985b..6b38fa8662 100755 --- a/.cicd/scripts/post_test_results.sh +++ b/.cicd/scripts/post_test_results.sh @@ -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 " + + ##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 " + else + git commit --allow-empty -m "[AutoRT] ${machine} Job Failed! \n\n\n on-behalf-of @ufs-community " + 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 diff --git a/.cicd/scripts/wm_test.sh b/.cicd/scripts/wm_test.sh index d3469ec770..c2f9eaba4e 100755 --- a/.cicd/scripts/wm_test.sh +++ b/.cicd/scripts/wm_test.sh @@ -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