Module: Mesa
Branch: main
Commit: ea85f6cfda145e85ec9e88634501e225ed856339
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea85f6cfda145e85ec9e88634501e225ed856339

Author: Guilherme Gallo <[email protected]>
Date:   Wed May  4 10:52:10 2022 -0300

ci: Fix init-stage2 exit code

After a LAVA job submitter rework, the init-stage2.sh was changed to be
compatible with new LAVA job definitions, but the result from the script
represented by `HWCI_TEST_SCRIPT` variable is obfuscated by the `set -e`
command. So when the test script fails, `set` will override the exit
code and the jobs will pass when they should fail.

Signed-off-by: Guilherme Gallo <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16325>

---

 .gitlab-ci/common/init-stage2.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/common/init-stage2.sh b/.gitlab-ci/common/init-stage2.sh
index 59e974ecce1..769b4c7355f 100755
--- a/.gitlab-ci/common/init-stage2.sh
+++ b/.gitlab-ci/common/init-stage2.sh
@@ -127,8 +127,8 @@ fi
 RESULT=fail
 set +e
 sh -c "$HWCI_TEST_SCRIPT"
-set -e
 EXIT_CODE=$?
+set -e
 
 # Let's make sure the results are always stored in current working directory
 mv -f ${CI_PROJECT_DIR}/results ./ 2>/dev/null || true

Reply via email to