diff --git a/bot/check-test.sh b/bot/check-test.sh index 3b16e5c415..9ff383a13b 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -23,6 +23,16 @@ else [[ ${VERBOSE} -ne 0 ]] && echo " Slurm output file '"${job_out}"' NOT found" fi +# First, account for the scenario where we skipped the ReFrame test suite +SKIPPED=-1 +if [[ ${SLURM_OUTPUT_FOUND} -eq 1 ]]; then + GP_skipped='Skipping EESSI test site run' + grep_reframe_skipped=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep "${GP_skipped}") + [[ $? -eq 0 ]] && SKIPPED=1 || SKIPPED=0 + # have to be careful to not add searched for pattern into slurm out file + [[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_skipped}"'" + [[ ${VERBOSE} -ne 0 ]] && echo "${grep_reframe_skipped}" +fi # ReFrame prints e.g. #[----------] start processing checks @@ -90,6 +100,10 @@ elif [[ ${SUCCESS} -eq 1 ]]; then summary=":grin: SUCCESS" reason="" status="SUCCESS" +elif [[ ${SKIPPED} -eq 1]]; then + summary="SKIPPED" + reason="The EESSI test suite was skipped. If this PR only deploys scripts, that's expected behavior." + status="SUCCESS" # Should come before general errors: if FAILED==1, it indicates the test suite ran # otherwise the pattern wouldn't have been there elif [[ ${FAILED} -eq 1 ]]; then diff --git a/test_suite.sh b/test_suite.sh index e7151e00e7..ad756f9c76 100755 --- a/test_suite.sh +++ b/test_suite.sh @@ -198,6 +198,10 @@ fi # Get the subset of test names based on the test mapping and tags (e.g. CI, 1_node) module_list="module_files.list.txt" mapping_config="tests/eessi_test_mapping/software_to_tests.yml" +if [[ ! -f "$module_list" || ! -f "$mapping_config" ]]; then + fatal_error "No new module files were found. Skipping EESSI test site run." +fi + # Run with --debug for easier debugging in case there are issues: python3 tests/eessi_test_mapping/map_software_to_test.py --module-list "${module_list}" --mapping-file "${mapping_config}" --debug REFRAME_NAME_ARGS=$(python3 tests/eessi_test_mapping/map_software_to_test.py --module-list "${module_list}" --mapping-file "${mapping_config}")