summaryrefslogtreecommitdiffstats
path: root/test_build.sh
Commit message (Collapse)AuthorAgeFilesLines
* test_build.sh: Use multiple cores if Make is usedFelix Singer2022-09-231-2/+2
| | | | | | | | | | Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Ia67e9202e49f1b4bc3301399a8ec741ac01c3ce0 Reviewed-on: https://review.coreboot.org/c/flashrom/+/67244 Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* test_build.sh: Build all programmers individually using MesonFelix Singer2022-09-231-3/+23
| | | | | | | | | | | | | | | | | | | | | | The test build script already builds each programmer individually when Make is used. To check if the Meson build system is working properly, build each programmer individually and in addition to that build-test the programmer groups individually. Builds are done in the directory `out`, while for each build a new subdirectory with the name of the programmer option is created. Also, return when scan-build is used and the group `all` isn't selected, since it's not needed to run scan-build in combination with the other options. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I703127a2dc31d316d3d1c842b5bcb0b22c39c0d4 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66475 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Patrick Georgi <patrick@coreboot.org>
* test_build.sh: Delete old build dir when Meson is usedFelix Singer2022-09-231-4/+7
| | | | | | | | | | | | Make sure to start from a clean environment when Meson is used. Also, rename the variable "builddir" to "build_dir" for better readability and to avoid typos. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I050ed916685728cbed9c10601a6bcad6d59a4eda Reviewed-on: https://review.coreboot.org/c/flashrom/+/67541 Reviewed-by: Thomas Heijligen <src@posteo.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* test_build.sh: Improve robustness when dealing with empty $CCPatrick Georgi2022-09-211-1/+1
| | | | | | | | | | | | | Add quotes so that = knows what to compare, otherwise the shell complains: ./test_build.sh: 16: [: =: unexpected operator Change-Id: Ia289b31291949f5cbc11484b8f1a7cb7a49bd2bb Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/67740 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* test_build.sh: Identify runs for Coverity ScanPatrick Georgi2022-09-211-1/+1
| | | | | | | | | | | | | For Coverity Scan[0] the same build rules apply as for scan-build. [0] https://scan.coverity.com/projects/flashrom Change-Id: I75147799b1c3213866e343a0384c94d0a1f5c249 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/67739 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* test_build.sh: Enforce tests to be enabledFelix Singer2022-09-081-1/+1
| | | | | | | | | | | Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I00c23a17926ed112522b083f8594596d051cf9f8 Reviewed-on: https://review.coreboot.org/c/flashrom/+/67243 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* test_build.sh: Build all programmers individually using MakeFelix Singer2022-08-091-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* test_build.sh: Move commands into functionsFelix Singer2022-08-081-5/+14
| | | | | | | | | | | In preparation to follow up commits, move the commands into functions so that it's clear what belongs to what. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Ia2dc6f1d4d53b4d6a1255ef31c66799a484302fc Reviewed-on: https://review.coreboot.org/c/flashrom/+/66093 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* test_build.sh: Allow WARNERROR to be overriddenMartin Roth2022-05-311-1/+1
| | | | | | | | | | | | | | | | Currently, WARNERROR is hardcoded to 'yes' which is what we want most of the time, but there are cases (such as when building with -fanalyzer) that we don't want it enabled, so we see the entire output of the build, and it doesn't halt at the first error. Removing the WARNERROR line from the script allows the variable to be overridden from an environment variable. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Iea931e57f2a6992762566dc3dbaae8bb8df5b226 Reviewed-on: https://review.coreboot.org/c/flashrom/+/62745 Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* test_build.sh: use -C option of ninja to specify the build directoryThomas Heijligen2021-04-141-3/+5
| | | | | | | | | Change-Id: I04a0fdf9b5126b9f4006e8229c3926ceb1013456 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/51979 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* test_build.sh: use sh from envThomas Heijligen2021-04-141-1/+1
| | | | | | | | | Change-Id: I3897b8d980425ecbb89b238d4a766f628cf9d3e6 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/51978 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* test_build.sh: Move build test procedure to repositoryPatrick Georgi2020-11-031-0/+8
Instead of hard coding the test procedure on qa.coreboot.org, allow running a script in the repo instead. The server is already adapted to do that, so once there's a test_build.sh file in the toplevel directory, it's run in place of the default operation. The content of this change mirrors the default operation exactly so should serve as a good starting point. The script is executed in an encapsulate[0] context with the workspace, /tmp and $HOME/.ccache writable, everything else read-only and network disabled. It should return 0 on success, anything else on failure, as is normal for UNIX processes. [0] https://review.coreboot.org/cgit/encapsulate.git Change-Id: I37a8e925d1b283c3b8f87cb3d0f1ed8920f2cf95 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/46894 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>