Attention is currently required from: Nico Huber, Thomas Heijligen, Anastasia Klimchuk.

Felix Singer would like build bot (Jenkins), Nico Huber, Thomas Heijligen and Anastasia Klimchuk to review this change.

View Change

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>
---
M test_build.sh
1 file changed, 58 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/06/68006/1
diff --git a/test_build.sh b/test_build.sh
index 6cb902c..cf20418 100755
--- a/test_build.sh
+++ b/test_build.sh
@@ -1,5 +1,29 @@
#!/bin/sh
set -e

+is_scan_build_env=0
+
+make_programmer_opts="INTERNAL SERPROG RAYER_SPI PONY_SPI NIC3COM GFXNVIDIA SATASII ATAHPT ATAVIA \
+ ATAPROMISE FT2232_SPI USBBLASTER_SPI MSTARDDC_SPI PICKIT2_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
+
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

To view, visit change 68006. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: 1.1.x
Gerrit-Change-Id: I3bacb3ba9c6708f1e7ef5a111290d0ea3af36f1d
Gerrit-Change-Number: 68006
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Nico Huber <nico.h@gmx.de>
Gerrit-Attention: Thomas Heijligen <src@posteo.de>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-MessageType: newchange