From 95572e25c4248c203553429c704965c85a6d1dba Mon Sep 17 00:00:00 2001 From: Pawel Szymaszek Date: Wed, 19 Nov 2025 15:09:48 +0100 Subject: [PATCH 1/2] automated: linux: torizon: integration: fix case statement Wrong variable name led to incorrect lava job execution Signed-off-by: Pawel Szymaszek --- automated/linux/torizon/integration-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated/linux/torizon/integration-tests.sh b/automated/linux/torizon/integration-tests.sh index 15d06f461..614bcbee1 100755 --- a/automated/linux/torizon/integration-tests.sh +++ b/automated/linux/torizon/integration-tests.sh @@ -33,7 +33,7 @@ case "${abi}" in SPIRE_ARCH="linux_amd64" ;; arm64|aarch64) - GECKODRIVER="linux-aarch64" + GECKODRIVER_ARCH="linux-aarch64" SPIRE_ARCH="linux_arm64" ;; *) From e54e5a39f4cb6357401bc742cacdd1af93e5d3af Mon Sep 17 00:00:00 2001 From: Pawel Szymaszek Date: Wed, 19 Nov 2025 15:15:01 +0100 Subject: [PATCH 2/2] automated: linux: torizon: integration: add quotation marks, brackets to variables To prevent any malicious actions, all remaining variables were surrounded with quotes or brackets. Signed-off-by: Pawel Szymaszek --- automated/linux/torizon/integration-tests.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/automated/linux/torizon/integration-tests.sh b/automated/linux/torizon/integration-tests.sh index 614bcbee1..99a824178 100755 --- a/automated/linux/torizon/integration-tests.sh +++ b/automated/linux/torizon/integration-tests.sh @@ -4,7 +4,7 @@ set -x . ../../lib/sh-test-lib -UTILS_PATH=$(cd ../../utils && pwd) +UTILS_PATH="$(cd ../../utils && pwd)" # source the secrets file to get the gitlab_token env var lava_test_dir="$( @@ -46,28 +46,28 @@ GECKODRIVER="geckodriver-${GECKO_VERSION}-${GECKODRIVER_ARCH}.tar.gz" SPIRE="staging-spire_${SPIRE_VERSION}_${SPIRE_ARCH}.deb" # Download and install spire package -curl -sSLO "https://github.com/Linaro/SPIRE-CLI-S-/releases/download/$SPIRE_VERSION/$SPIRE" -dpkg -i "$SPIRE" +curl -sSLO "https://github.com/Linaro/SPIRE-CLI-S-/releases/download/${SPIRE_VERSION}/${SPIRE}" +dpkg -i "${SPIRE}" # Download and install gecko driver -curl -LO "https://github.com/mozilla/geckodriver/releases/download/${GECKO_VERSION}/$GECKODRIVER" -tar -xf "$GECKODRIVER" +curl -LO "https://github.com/mozilla/geckodriver/releases/download/${GECKO_VERSION}/${GECKODRIVER}" +tar -xf "${GECKODRIVER}" mv geckodriver /usr/local/bin chown root:root /usr/local/bin/geckodriver # Download and install uv curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" | sh -. "$HOME"/.local/bin/env +. "${HOME}"/.local/bin/env # clone baklava-integration repo and install required pip pkgs -get_test_program "https://gitlab-ci-token:${GITLAB_TOKEN}@gitlab.com/LinaroLtd/lava/appliance/baklava-integration/docker-tests.git" "docker-tests" "$BRANCH_NAME" +get_test_program "https://gitlab-ci-token:${GITLAB_TOKEN}@gitlab.com/LinaroLtd/lava/appliance/baklava-integration/docker-tests.git" "docker-tests" "${BRANCH_NAME}" export SPIRE_PAT_TOKEN LAVA_TOKEN LAVA_PASSWORD SQUAD_UPLOAD_URL SQUAD_ARCHIVE_SUBMIT_TOKEN # run tests with uv -uv run robot --pythonpath . --exclude gitlab_pipeline --variable remote:"$IS_REMOTE" --outputdir=.. --listener test/keyword_listener.py test/ +uv run robot --pythonpath . --exclude gitlab_pipeline --variable remote:"${IS_REMOTE}" --outputdir=.. --listener test/keyword_listener.py test/ -"${UTILS_PATH}"/upload-to-squad.sh -a ../output.xml -u "$SQUAD_UPLOAD_URL" +"${UTILS_PATH}"/upload-to-squad.sh -a ../output.xml -u "${SQUAD_UPLOAD_URL}" uv run --project "${UTILS_PATH}"/ uv run "${UTILS_PATH}"/parse-robot-framework.py -r ../output.xml exit 0