From c25b14fa2310d8c46f4ede3197f923d28883934a Mon Sep 17 00:00:00 2001 From: Guilherme Gallo Date: Thu, 24 Jul 2025 15:21:23 -0300 Subject: [PATCH] ci/bare-metal: Fix exit code variable `bm-init.sh` executes `init-stage1.sh` and then an `export`, but the latter command overwrite the exit code `$?`, so we need to put the first exit code into a variable. Signed-off-by: Guilherme Gallo Part-of: --- .gitlab-ci/bare-metal/bm-init.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/bare-metal/bm-init.sh b/.gitlab-ci/bare-metal/bm-init.sh index d55f8032516..75a3ead73ea 100755 --- a/.gitlab-ci/bare-metal/bm-init.sh +++ b/.gitlab-ci/bare-metal/bm-init.sh @@ -4,11 +4,12 @@ # First stage: very basic setup to bring up network and /dev etc /init-stage1.sh +INIT_STAGE1_EXIT_CODE=$? export CURRENT_SECTION=dut_boot # Second stage: run jobs -test $? -eq 0 && /init-stage2.sh +test $INIT_STAGE1_EXIT_CODE -eq 0 && /init-stage2.sh # Wait until the job would have timed out anyway, so we don't spew a "init # exited" panic.