Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/46894 )
Change subject: test_build.sh: Move build test procedure to repository ......................................................................
test_build.sh: Move build test procedure to repository
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 --- A test_build.sh 1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/94/46894/1
diff --git a/test_build.sh b/test_build.sh new file mode 100755 index 0000000..0e7f37a --- /dev/null +++ b/test_build.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +make CONFIG_EVERYTHING=yes WARNERROR=yes + +meson -p out +(cd out && ninja) +(cd out && ninja test)
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/46894
to look at the new patch set (#2).
Change subject: test_build.sh: Move build test procedure to repository ......................................................................
test_build.sh: Move build test procedure to repository
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 --- A test_build.sh 1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/94/46894/2
Septs has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/46894 )
Change subject: test_build.sh: Move build test procedure to repository ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/flashrom/+/46894/2/test_build.sh File test_build.sh:
https://review.coreboot.org/c/flashrom/+/46894/2/test_build.sh@2 PS2, Line 2: set -e Recommended to use "Bash Strict Mode" see http://redsymbol.net/articles/unofficial-bash-strict-mode/
https://review.coreboot.org/c/flashrom/+/46894/2/test_build.sh@7 PS2, Line 7: (cd out && ninja) Why not add `out` directory to `.gitignore`?
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/46894 )
Change subject: test_build.sh: Move build test procedure to repository ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/46894 )
Change subject: test_build.sh: Move build test procedure to repository ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/flashrom/+/46894/2/test_build.sh File test_build.sh:
https://review.coreboot.org/c/flashrom/+/46894/2/test_build.sh@2 PS2, Line 2: set -e
Recommended to use "Bash Strict Mode" […]
This script uses no pipes or variables.
https://review.coreboot.org/c/flashrom/+/46894/2/test_build.sh@7 PS2, Line 7: (cd out && ninja)
Why not add `out` directory to `. […]
Because people are free to use whatever build directory they want. Why add it?
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/flashrom/+/46894 )
Change subject: test_build.sh: Move build test procedure to repository ......................................................................
test_build.sh: Move build test procedure to repository
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 --- A test_build.sh 1 file changed, 8 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Edward O'Callaghan: Looks good to me, approved
diff --git a/test_build.sh b/test_build.sh new file mode 100755 index 0000000..0e43cd3 --- /dev/null +++ b/test_build.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +make CONFIG_EVERYTHING=yes WARNERROR=yes + +meson out +(cd out && ninja) +(cd out && ninja test)