From: Yann Dirson Date: Fri, 1 Dec 2023 09:33:46 +0000 (+0100) Subject: ci: fix handling of build errors X-Git-Tag: 0.3.0~13^2~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=aabd888ffeb04c74b70dc62dfa86c225ba4cc321;p=xen-guest-agent.git ci: fix handling of build errors When using the "! command" shell syntax, $? returns the status of the negated command, so the script was reporting success in all cases. Just avoid using that syntax. #TestsNeedTesting Signed-off-by: Yann Dirson --- diff --git a/devscripts/gitlab-ci-runbuild.sh b/devscripts/gitlab-ci-runbuild.sh index 8a22c4d..ce60a70 100755 --- a/devscripts/gitlab-ci-runbuild.sh +++ b/devscripts/gitlab-ci-runbuild.sh @@ -15,8 +15,10 @@ printf "\e[0Ksection_start:$(date +%s):${FOOTER_ID}[collapsed=true]\r\e[0K\e[1;3 set -x IGNORED_ERROR=0 -if ! "$@"; then - ret=$?; +if "$@" ; then + : no error, just go on +else + ret=$? case "$(git show --summary --format=format:%s)" in WIP*) IGNORED_ERROR=1