Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/edk2/+/58497 )
Change subject: run-jenkins-test.sh: Add script for basic build testing ......................................................................
run-jenkins-test.sh: Add script for basic build testing
This will be used by Jenkins to provide build testing to ensure that our changes don't make _too_ much of a mess (no runtime testing at this time).
The script will execute in a locked down environment without networking and limited write access.
No machine readable logging of success or failure yet, this could be a later addition (in junit.xml or TAP format).
Change-Id: I6e6351d0948208c0e78ceb8a6140e088e52ff6a7 Signed-off-by: Patrick Georgi pgeorgi@google.com Reviewed-on: https://review.coreboot.org/c/edk2/+/58497 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Martin Roth martinroth@google.com --- A run-jenkins-tests.sh 1 file changed, 32 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved Angel Pons: Looks good to me, but someone else must approve
diff --git a/run-jenkins-tests.sh b/run-jenkins-tests.sh new file mode 100755 index 0000000..43b0f43 --- /dev/null +++ b/run-jenkins-tests.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -e +cd "$(dirname "$0")" + +# CPUS should be passed in by the builder, but in case that not (e.g. locally), +# let's not slow things down too much. +if [ -z "${CPUS}" ]; then + CPUS=$(nproc) +fi + +# Make COREBOOT toolchain known +. ./edksetup.sh +rm -f "${CONF_PATH}/tools_def.txt" +. ./edksetup.sh +cat "$(dirname $(command -v i386-elf-gcc))/../share/edk2config/tools_def.txt" >> "${CONF_PATH}/tools_def.txt" + +rm -rf Build/ +if [ -n "${COREBOOT_BUILD_DIR}" ]; then + ln -s "${COREBOOT_BUILD_DIR}" Build +fi + +# Ensure tools are ready +make -C BaseTools/Source/C -j "${CPUS}" + +# Make sure that whatever we do, we don't break upstream use cases +build -q -t COREBOOT -j "${CPUS}" -a X64 -p OvmfPkg/OvmfPkgX64.dsc +build -q -t COREBOOT -j "${CPUS}" -a IA32 -p OvmfPkg/OvmfPkgIa32.dsc +build -q -t COREBOOT -j "${CPUS}" -a IA32 -a X64 -p OvmfPkg/OvmfPkgIa32X64.dsc + +# Test coreboot payload configs +build -q -t COREBOOT -j "${CPUS}" -a IA32 -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -b DEBUG -D BOOTLOADER=COREBOOT -D PS2_KEYBOARD_ENABLE +build -q -t COREBOOT -j "${CPUS}" -a IA32 -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -b RELEASE -D BOOTLOADER=COREBOOT -D PS2_KEYBOARD_ENABLE