From 5ee28514813c6d36af8d1048711cd2dd8769c13c Mon Sep 17 00:00:00 2001 From: Erik Skultety Date: Thu, 24 Aug 2023 15:44:52 +0200 Subject: [PATCH] ci: build.sh: Add a wrapper function over meson's setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Daniel P. Berrangé --- ci/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/build.sh b/ci/build.sh index a5f6f812fb..51eeff03e8 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -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) +}