Skip to content

Commit

Permalink
add steps for running and checking tests after a build ended
Browse files Browse the repository at this point in the history
  • Loading branch information
truib committed Oct 13, 2023
1 parent 532b6ea commit 3529182
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions scripts/bot-build.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,26 @@ artefacts =
EOF
fi
echo "check result step finished"
TEST_SCRIPT=bot/test.sh
if [ -f ${TEST_SCRIPT} ]; then
echo "${TEST_SCRIPT} script found in '${PWD}', so running it!"
${TEST_SCRIPT}
echo "${TEST_SCRIPT} finished"
else
echo "could not find ${TEST_SCRIPT} script in '${PWD}'" >&2
fi
CHECK_TEST_SCRIPT=bot/check-test.sh
if [ -f ${CHECK_TEST_SCRIPT} ]; then
echo "${CHECK_TEST_SCRIPT} script found in '${PWD}', so running it!"
${CHECK_TEST_SCRIPT}
else
echo "could not find ${CHECK_TEST_SCRIPT} script in '${PWD}' ..."
echo "... depositing default _bot_job${SLURM_JOB_ID}.test file in '${PWD}'"
cat << 'EOF' > _bot_job${SLURM_JOB_ID}.test
[RESULT]
comment_description = <details><summary>:shrug: UNKNOWN _(click triangle for detailed information)_<summary/><ul><li>Did not find `bot/check-test.sh` script in job's work directory.</li><li>*Check job manually or ask an admin of the bot instance to assist you.*</li></ul></details>
status = UNKNOWN
artefacts =
EOF
fi
echo "check test step finished"

0 comments on commit 3529182

Please sign in to comment.