diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3807a34..f43761d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ build-and-test-with-drm: image: alpine:3.19 script: + - set -e # Stop on first error - apk -q add git bash build-base meson linux-headers inih-dev libinput-dev libxkbcommon-dev libdrm-dev scdoc - git submodule init - git submodule update @@ -9,6 +10,7 @@ build-and-test-with-drm: build-and-test-without-drm: image: alpine:3.19 script: + - set -e # Stop on first error - apk -q add git bash build-base meson linux-headers inih-dev libinput-dev libxkbcommon-dev scdoc - git submodule init - git submodule update @@ -17,6 +19,7 @@ build-and-test-without-drm: build-iskey: image: alpine:3.19 script: + - set -e # Stop on first error - apk -q add git bash build-base meson linux-headers libevdev-dev - cd iskey - meson setup _build diff --git a/test/helpers.sh b/test/helpers.sh index 027fca9..7e80e3b 100644 --- a/test/helpers.sh +++ b/test/helpers.sh @@ -58,8 +58,10 @@ function ok() { function run_script() { info "Executing $1" - "$1" + rc=0 + "$1" || rc=1 echo + return $rc } function read_version_from_meson() { diff --git a/test/test-with-drm.sh b/test/test-with-drm.sh index 8225510..58fc1b7 100755 --- a/test/test-with-drm.sh +++ b/test/test-with-drm.sh @@ -4,8 +4,12 @@ root=$(dirname "${BASH_SOURCE[0]}") source "$root/helpers.sh" -run_script "$root/build-with-drm.sh" -run_script "$root/test-version-matches-meson-and-changelog.sh" -run_script "$root/test-uses-fb-backend-by-default.sh" -run_script "$root/test-uses-fb-backend-if-selected-via-config.sh" -run_script "$root/test-uses-drm-backend-if-selected-via-config-and-available.sh" +rc=0 + +run_script "$root/build-with-drm.sh" || rc=1 +run_script "$root/test-version-matches-meson-and-changelog.sh" || rc=1 +run_script "$root/test-uses-fb-backend-by-default.sh" || rc=1 +run_script "$root/test-uses-fb-backend-if-selected-via-config.sh" || rc=1 +run_script "$root/test-uses-drm-backend-if-selected-via-config-and-available.sh" || rc=1 + +exit $rc diff --git a/test/test-without-drm.sh b/test/test-without-drm.sh index a8e86c9..3483041 100755 --- a/test/test-without-drm.sh +++ b/test/test-without-drm.sh @@ -4,8 +4,12 @@ root=$(dirname "${BASH_SOURCE[0]}") source "$root/helpers.sh" -run_script "$root/build-without-drm.sh" -run_script "$root/test-version-matches-meson-and-changelog.sh" -run_script "$root/test-uses-fb-backend-by-default.sh" -run_script "$root/test-uses-fb-backend-if-selected-via-config.sh" -run_script "$root/test-uses-fb-backend-if-drm-selected-via-config-but-unavailable.sh" +rc=0 + +run_script "$root/build-without-drm.sh" || rc=1 +run_script "$root/test-version-matches-meson-and-changelog.sh" || rc=1 +run_script "$root/test-uses-fb-backend-by-default.sh" || rc=1 +run_script "$root/test-uses-fb-backend-if-selected-via-config.sh" || rc=1 +run_script "$root/test-uses-fb-backend-if-drm-selected-via-config-but-unavailable.sh" || rc=1 + +exit $rc