Skip to content

Commit

Permalink
For PRs that only deploy scripts, such as our second attempt at EESSI…
Browse files Browse the repository at this point in the history
…#736, the test step should be skipped.
  • Loading branch information
Caspar van Leeuwen committed Oct 2, 2024
1 parent 720787c commit a636f63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bot/check-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit a636f63

Please sign in to comment.