From da292b019cafd1caebfb40f9b2e1192002c6e89a Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 10 Oct 2024 09:41:16 -0400 Subject: [PATCH] ci/bare-metal: Use section for boot messages from poe-powered Very few people ever want to see the exact details of how we attempt to boot a device. Signed-off-by: Daniel Stone Part-of: --- .gitlab-ci/bare-metal/poe-powered.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/bare-metal/poe-powered.sh b/.gitlab-ci/bare-metal/poe-powered.sh index 06df9381289..1eb529f1158 100755 --- a/.gitlab-ci/bare-metal/poe-powered.sh +++ b/.gitlab-ci/bare-metal/poe-powered.sh @@ -192,6 +192,7 @@ python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update farm "${FAR ATTEMPTS=3 first_attempt=True while [ $((ATTEMPTS--)) -gt 0 ]; do + section_start dut_boot "Booting hardware device ..." python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --create-dut-job dut_name "${CI_RUNNER_DESCRIPTION}" # Update subtime time to CI_JOB_STARTED_AT only for the first run if [ "$first_attempt" = "True" ]; then @@ -208,13 +209,17 @@ while [ $((ATTEMPTS--)) -gt 0 ]; do ret=$? if [ $ret -eq 2 ]; then - echo "Did not detect boot sequence, retrying..." python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job first_attempt=False + error "Device failed to boot; will retry" else + # We're no longer in dut_boot by this point + unset CURRENT_SECTION ATTEMPTS=0 fi done + +section_start dut_cleanup "Cleaning up after job" python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close set -e @@ -226,5 +231,6 @@ date +'%F %T' cp -Rp /nfs/results/. results/ date +'%F %T' +section_end dut_cleanup exit $ret