From 352918265f77a41800a429c52148c9dd0ab794b6 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Fri, 13 Oct 2023 21:25:08 +0200 Subject: [PATCH] add steps for running and checking tests after a build ended --- scripts/bot-build.slurm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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"