]> xenbits.xensource.com Git - xen-guest-agent.git/commitdiff
ci: fix handling of build errors
authorYann Dirson <yann.dirson@vates.fr>
Fri, 1 Dec 2023 09:33:46 +0000 (10:33 +0100)
committerYann Dirson <yann.dirson@vates.fr>
Fri, 1 Dec 2023 11:22:25 +0000 (12:22 +0100)
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 <yann.dirson@vates.fr>
devscripts/gitlab-ci-runbuild.sh

index 8a22c4da24d873afb0e4e8ca6608aae42ed54780..ce60a70c1b5ec8fb2d88f1339bfebbbb251603cb 100755 (executable)
@@ -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