From 70509e5b02580c0ae48d145c2a6b9bb3d4a8df5e Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 24 Mar 2025 19:42:26 +0100 Subject: [PATCH 1/5] Stop CI on first error --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) 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 From 80d388ebff19fd2ccfb20476bcfd60f839f4b179 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 24 Mar 2025 19:48:32 +0100 Subject: [PATCH 2/5] Collect exit codes --- test/test-with-drm.sh | 14 +++++++++----- test/test-without-drm.sh | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) 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 From a64ef9bad4f9018fca13f668a0cdabac0f438129 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 24 Mar 2025 19:53:08 +0100 Subject: [PATCH 3/5] Return exit code from run_script --- test/helpers.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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() { From e44dd2412ced16671b9e9bbb7fd3f66d40d55320 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 24 Mar 2025 19:55:50 +0100 Subject: [PATCH 4/5] Test fix manpage --- man/unl0kr.1.scd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/unl0kr.1.scd b/man/unl0kr.1.scd index 65c30ab..523fc61 100644 --- a/man/unl0kr.1.scd +++ b/man/unl0kr.1.scd @@ -45,7 +45,7 @@ password is printed to STDOUT. All other output happens on STDERR. *-h, --help* Print this message and exit. *-n* - Do not append a newline character to a password. + Do not append a newline character to a password. *-v, --verbose* Enable more detailed logging output on STDERR. *-V, --version* From 5b54f494a65933db52a8e8591d38e1766ce17c93 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 24 Mar 2025 19:57:14 +0100 Subject: [PATCH 5/5] Revert "Test fix manpage" This reverts commit e44dd2412ced16671b9e9bbb7fd3f66d40d55320. --- man/unl0kr.1.scd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/unl0kr.1.scd b/man/unl0kr.1.scd index 523fc61..65c30ab 100644 --- a/man/unl0kr.1.scd +++ b/man/unl0kr.1.scd @@ -45,7 +45,7 @@ password is printed to STDOUT. All other output happens on STDERR. *-h, --help* Print this message and exit. *-n* - Do not append a newline character to a password. + Do not append a newline character to a password. *-v, --verbose* Enable more detailed logging output on STDERR. *-V, --version*