From ea85f6cfda145e85ec9e88634501e225ed856339 Mon Sep 17 00:00:00 2001 From: Guilherme Gallo Date: Wed, 4 May 2022 10:52:10 -0300 Subject: [PATCH] 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 Part-of: --- .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