Now that MAKEALL supports direct options in KCONFIG_ADD, teach it to read runner kconfig_add keys out of the labgrid environment YAML files. This is a further step towards removal of test/emulate.pl. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- MAKEALL | 13 +++++++++++++ test/Containerfile | 1 + 2 files changed, 14 insertions(+) diff --git a/MAKEALL b/MAKEALL index b0967b8ae340..636621d9faec 100755 --- a/MAKEALL +++ b/MAKEALL @@ -422,6 +422,19 @@ else if [[ $i =~ ^.*/([^/]+)/([^@]*@|)([^.]+).yaml$ ]]; then arch=${BASH_REMATCH[1]} defconfig=${BASH_REMATCH[3]} + + if grep -q "^\s\+kconfig_add:" $i; then + if command -v yq 2>&1 >/dev/null; then + KCONFIG_ADD="${KCONFIG_ADD} $(yq -M -r \ + '.targets.main.runner.kconfig_add | + keys[] as $k | .[$k]' < $i)" + else + echo "WARNING: yq command not found in path" >&2 + echo "WARNING: ignoring kconfig_add in $i" >&2 + echo + fi + fi + do_build_defconfig $arch $defconfig if [ $? -eq 0 ]; then do_test_defconfig $config $defconfig "${pytest_opts[@]}" diff --git a/test/Containerfile b/test/Containerfile index db43d039b922..53a5443e48fe 100644 --- a/test/Containerfile +++ b/test/Containerfile @@ -51,6 +51,7 @@ RUN apt-get update && apt-get install -y \ sudo \ u-boot-tools \ yamllint \ + yq \ && rm -rf /var/lib/apt/lists/* ENV GCC_VERSION=14.2.0 -- 2.39.5