diff --git a/main/postmarketos-mkinitfs-hook-ci/05-ci.sh b/main/postmarketos-mkinitfs-hook-ci/05-ci.sh index 49ddf1548..b77e05ced 100644 --- a/main/postmarketos-mkinitfs-hook-ci/05-ci.sh +++ b/main/postmarketos-mkinitfs-hook-ci/05-ci.sh @@ -6,6 +6,20 @@ # shellcheck source=../devicepkg-utils/source_deviceinfo . /usr/share/misc/source_deviceinfo +# Prints a given string a couple of times, over a span of time +# This helps paper over weirdness where the output may not flush +# as eagerly as expected, and the CI may miss the messages. +# This also helps if any messages would end-up interleaved. +_report_ci() { + local precision=1000 + local duration=2 + local count=20 + while [ "$((count = count - 1))" -gt 0 ]; do + printf '%s\n' "$@" + sleep "$(printf '0.%03d' "$(( precision * duration / count ))")" + done +} + DID_FAIL=0 echo "==> Running postmarketos-mkinitfs-hook-ci" @@ -27,14 +41,13 @@ echo "==> re-enabling dmesg on console at loglevel 8" dmesg -n 8 if [ $DID_FAIL -ne 0 ]; then - echo "==> PMOS-CI-FAIL" + _report_ci "==> PMOS-CI-FAIL" else - echo "==> PMOS-CI-OK" + _report_ci "==> PMOS-CI-OK" fi # We're done, kill it # CDBA will exit if it sees 20 '~' characters # in a row, send a whole bunch just to be sure # In the worst case it will timeout. -echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" -echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +_report_ci "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" diff --git a/main/postmarketos-mkinitfs-hook-ci/APKBUILD b/main/postmarketos-mkinitfs-hook-ci/APKBUILD index ceab2b2fe..737e1f2a2 100644 --- a/main/postmarketos-mkinitfs-hook-ci/APKBUILD +++ b/main/postmarketos-mkinitfs-hook-ci/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Caleb Connolly pkgname=postmarketos-mkinitfs-hook-ci -pkgver=0.1.0 -pkgrel=2 +pkgver=0.1.1 +pkgrel=0 pkgdesc="Hook for doing automated CI tests in the initramfs" url="https://postmarketos.org" source=" @@ -20,6 +20,6 @@ package() { } sha512sums=" -43f9d9a35a57845eb36893a3f20d8ff5f20b93b1c22c7c6e3959b07a41b3c5fe2f9941612620cf006a0018b53edae5fdc7ed3006befc6908c19a5617f322dea3 05-ci.sh +3dfc0024370a43765081f34ae86e5289a6bd3f30daea81d8ed87e03e66e1001bb5ee02bdbabea7491c9f560cf2099968419c66090384b52890669a629246139e 05-ci.sh 26d665b817a4978dca44e0c697d98e12c58fa7941da86b9e3bfef6ecb0791d55859c0b671c00d7f88cfca688acf0dcc3e593ca5d8dd3cc094f582b49dabea645 05-ci.files "