From 348818fc6c56b818ed9f103196a8e45a6b92289b Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 12 May 2023 16:46:34 +0100 Subject: [PATCH] ci: only execute capture-devcoredump.sh when it's present Avoids this error: ./install/common/init-stage2.sh: line 130: /capture-devcoredump.sh: No such file or directory One step closer to an error-free CI and being able to `set -e`. Signed-off-by: Eric Engestrom Reviewed-by: Guilherme Gallo Reviewed-by: David Heidelberg Part-of: --- .gitlab-ci/common/init-stage2.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/common/init-stage2.sh b/.gitlab-ci/common/init-stage2.sh index eea7ca01c65..f291f79008d 100755 --- a/.gitlab-ci/common/init-stage2.sh +++ b/.gitlab-ci/common/init-stage2.sh @@ -127,8 +127,10 @@ fi # Start a little daemon to capture the first devcoredump we encounter. (They # expire after 5 minutes, so we poll for them). -/capture-devcoredump.sh & -BACKGROUND_PIDS="$! $BACKGROUND_PIDS" +if [ -x /capture-devcoredump.sh ]; then + /capture-devcoredump.sh & + BACKGROUND_PIDS="$! $BACKGROUND_PIDS" +fi # If we want Xorg to be running for the test, then we start it up before the # HWCI_TEST_SCRIPT because we need to use xinit to start X (otherwise