]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
ci: build.sh: Add a wrapper function over meson's setup
authorErik Skultety <eskultet@redhat.com>
Thu, 24 Aug 2023 13:44:52 +0000 (15:44 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 12 Sep 2023 09:36:03 +0000 (11:36 +0200)
The reason for this wrapper is that all job functions introduced in
future patches will refer to this one instead of open-coding the same
'meson setup' invocation N times. It also prevents 'setup' to be called
multiple times as some future job functions might actually do just that
in a transitive manner.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
ci/build.sh

index a5f6f812fb342c6f69aa4ded88ed2a5f22633dbf..51eeff03e843e63fdeda40f6f61ce20f16405f76 100644 (file)
@@ -32,3 +32,8 @@ run_cmd() {
     printf "\e[32m[RUN COMMAND]: '%s'\e[0m\n" "$*"
     "$@"
 }
+
+run_meson_setup() {
+    run_cmd meson setup build --error -Dsystem=true $MESON_OPTS $MESON_ARGS || \
+    (cat "${GIT_ROOT}/build/meson-logs/meson-log.txt" && exit 1)
+}