diff --git a/scripts/bot-build.slurm b/scripts/bot-build.slurm index 256286b0..b626c21f 100755 --- a/scripts/bot-build.slurm +++ b/scripts/bot-build.slurm @@ -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 =
:shrug: UNKNOWN _(click triangle for detailed information)_
  • Did not find `bot/check-test.sh` script in job's work directory.
  • *Check job manually or ask an admin of the bot instance to assist you.*
+status = UNKNOWN +artefacts = +EOF +fi +echo "check test step finished"