1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 07:02:34 +02:00

test_build.sh: Build all programmers individually using Make

While testing CB:63724, which reworks the Meson build system, it showed
that some programmers have dependency issues, which were invisible since
test_build.sh builds flashrom with all programmers enabled and thus all
sources are included. Building flashrom with each programmer
individually made these issues visible.

However, as commit 877b7741fcf9 and commit b6a439e45ef2 show, the Make
build system also had some similar issues, which were invisible for the
same reason.

Thus, in addition to building all programmers at once using the Make
build system, build each programmer individually.

Also, when clang analyzer is used, it's not needed to run it on each
programmer individually. Just return after flashrom was built with all
programmers enabled in this case.

An equivalent patch for the Meson build system is made separately.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I3bacb3ba9c6708f1e7ef5a111290d0ea3af36f1d
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66094
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Felix Singer 2022-07-22 22:52:08 +02:00 committed by Thomas Heijligen
parent ce971c6ce4
commit db026ea281

View File

@ -1,9 +1,38 @@
#!/usr/bin/env sh
set -e
# This script will only work on Linux with all dependencies installed.
is_scan_build_env=0
make_programmer_opts="INTERNAL INTERNAL_X86 SERPROG RAYER_SPI RAIDEN_DEBUG_SPI PONY_SPI NIC3COM \
GFXNVIDIA SATASII ATAHPT ATAVIA ATAPROMISE FT2232_SPI USBBLASTER_SPI MSTARDDC_SPI \
PICKIT2_SPI STLINKV3_SPI PARADE_LSPCON MEDIATEK_I2C_SPI REALTEK_MST_I2C_SPI DUMMY \
DRKAISER NICREALTEK NICNATSEMI NICINTEL NICINTEL_SPI NICINTEL_EEPROM OGP_SPI \
BUSPIRATE_SPI DEDIPROG DEVELOPERBOX_SPI SATAMV LINUX_MTD LINUX_SPI IT8212 \
CH341A_SPI DIGILENT_SPI JLINK_SPI"
if [ $(basename "${CC}") = "ccc-analyzer" ]; then
is_scan_build_env=1
fi
build_make () {
make clean
make CONFIG_EVERYTHING=yes
# In case of clang analyzer we don't want to run it on
# each programmer individually. Thus, just return here.
if [ ${is_scan_build_env} -eq 1 ]; then
return
fi
for option in ${make_programmer_opts}; do
echo "Building ${option}"
make clean
make CONFIG_NOTHING=yes CONFIG_${option}=yes
done
}