Martin L Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68956 )
Change subject: util/scripts: Add script to run abuild on specific SOCs ......................................................................
util/scripts: Add script to run abuild on specific SOCs
If this looks useful, let me know and I'll clean it up some. This just finds all the boards using a specified SOC and runs both CrOS and non-CrOS abuilds on them to make sure they're working.
Nobody wants to run the full what-jenkins-does build on their host machine. Hopefully this can help get some tests run locally before pushing to coreboot.org.
Signed-off-by: Martin Roth gaumless@gmail.com Change-Id: Ifc71c28bf64a805f203a815a9468ff9fe882aad3 --- A util/scripts/testsoc 1 file changed, 56 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/68956/1
diff --git a/util/scripts/testsoc b/util/scripts/testsoc new file mode 100755 index 0000000..af24208 --- /dev/null +++ b/util/scripts/testsoc @@ -0,0 +1,38 @@ +#!/usr/bin/bash + +SOC="${1:-SOC_AMD_MENDOCINO}" +ABUILD="./util/abuild/abuild" +OUTPUT="coreboot-builds" + +if [[ ! -f "MAINTAINERS" ]]; then + echo "Error: This doesn't look like the coreboot directory." + exit 1 +fi + +mainboards=$(grep -r "${SOC}" src/mainboard | sed 's|src/mainboard/||;s|/Kconfig.*||') + +if [ -n "${mainboards}" ]; then + printf "Building the boards:\n%s\n\n" "${mainboards}" +else + echo "Error: No mainboards using $SOC found." + exit 1 +fi + +for board in ${mainboards}; do + rm -rf "./${OUTPUT}" + + # Non-CrOS build + if ! "${ABUILD}" -z -e -r -c $(nproc) -t "${board}"; then + echo "Error: Non-cros build of ${board} failed. + exit 1 + fi + + # CrOS build + if ! "${ABUILD}" -z -e -x -r -c $(nproc) -t "${board}"; then + echo "Error: CrOS build of ${board} failed. + exit 1 + fi + +done + +printf "\nSuccessfully built all boards\n%s\n\n" "${mainboards}"