ci: fix WOLFBOOT_ROOT resolution in dual-bank fallback test

The top-level Makefile defaults WOLFBOOT_ROOT to $(PWD), which is the
environment value of the invoking step: under the workflow's
working-directory (test-app/emu-test-apps) the keytools paths resolved
under the wrong root and keygen was never found, so src/keystore.c was
missing and the wolfboot build failed. Export the computed absolute
WOLFBOOT_ROOT so the make invocations resolve tool paths correctly
wherever the script is started from.
pull/821/head
Daniele Lacamera 2026-07-09 16:43:55 +02:00
parent 3744aae33d
commit 8609c9b23b
1 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,10 @@ set -euo pipefail
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
WOLFBOOT_ROOT="${WOLFBOOT_ROOT:-$(cd "$script_dir/../.." && pwd)}"
# The top-level Makefile defaults WOLFBOOT_ROOT to $(PWD), which is the
# caller's directory when invoked via make -C: export the real root so
# tool paths (keygen/sign) resolve correctly wherever this script runs.
export WOLFBOOT_ROOT
EMU_APPS="$WOLFBOOT_ROOT/test-app/emu-test-apps"
EMU_DIR=stm32u585-dualbank
EMU_PATH="$EMU_APPS/$EMU_DIR"