Publish helper test output atomically and patch the release package

This commit is contained in:
Storm Dragon committed 2026-10-31 11:03:48 -04:00
1 parent 2ddd2098fc
commit 9538776fe3
4 files changed
+29 -5

No files matched your search

+3 -1
View File
@@ -1,7 +1,7 @@
pkgbase = cthulhu
pkgdesc = Desktop-agnostic screen reader with speech, Braille, and Tentacle support
pkgver = 2026.10.31
pkgrel = 1
pkgrel = 2
url = https://git.stormux.org/storm/cthulhu
arch = x86_64
arch = aarch64
@@ -35,7 +35,9 @@ pkgbase = cthulhu
options = !debug
options = !lto
source = cthulhu::git+https://git.stormux.org/storm/cthulhu.git#tag=2026.10.31
source = helper-environment-test.patch
sha512sums = SKIP
sha512sums = 219debca6195ff9cc79f464beed67baa7847bb84075ee3796401f2be9cfb34fac437ac3065e16fdaa30d2456f6d04da93a84f24e4dd27338463e166e445ec4a1
optdepends_x86_64 = wine-access: Wine, Proton, NVDA Controller, and Tolk integration
pkgname = cthulhu
+10 -3
View File
@@ -3,7 +3,7 @@
pkgname=cthulhu
pkgver=2026.10.31
pkgrel=1
pkgrel=2
pkgdesc="Desktop-agnostic screen reader with speech, Braille, and Tentacle support"
url="https://git.stormux.org/storm/cthulhu"
arch=(x86_64 aarch64 armv7h)
@@ -53,8 +53,15 @@ makedepends=(
)
options=(!debug !lto)
# The release tag must exist upstream before makepkg can fetch this source.
source=("${pkgname}::git+https://git.stormux.org/storm/${pkgname}.git#tag=${pkgver}")
sha512sums=('SKIP')
source=("${pkgname}::git+https://git.stormux.org/storm/${pkgname}.git#tag=${pkgver}"
"helper-environment-test.patch")
sha512sums=('SKIP'
'219debca6195ff9cc79f464beed67baa7847bb84075ee3796401f2be9cfb34fac437ac3065e16fdaa30d2456f6d04da93a84f24e4dd27338463e166e445ec4a1')
prepare() {
cd "${pkgname}"
patch -Np1 -i "${srcdir}/helper-environment-test.patch"
}
build() {
cd "${pkgname}"
@@ -0,0 +1,14 @@
diff --git a/internal/wine/manager_test.go b/internal/wine/manager_test.go
index 438fe26..0a5a0bb 100644
--- a/internal/wine/manager_test.go
+++ b/internal/wine/manager_test.go
@@ -226,7 +226,8 @@ func TestManagerLaunchesAndStopsHelperForActivePrefix(t *testing.T) {
t.Setenv("CTHULHU_TEST_WINE_OUTPUT", output)
t.Setenv("DBUS_SESSION_BUS_ADDRESS", "unix:path=/reader-bus")
helper := filepath.Join(root, "helper")
- script := "#!/bin/sh\nprintf '%s\\n' \"$WINEPREFIX\" \"$CTHULHU_WINE_ACCESS_MANAGED\" \"$DBUS_SESSION_BUS_ADDRESS\" \"$DISPLAY\" > \"$CTHULHU_TEST_WINE_OUTPUT\"\nexec sleep 30\n"
+ // Publish the complete environment atomically; printf can issue multiple writes.
+ script := "#!/bin/sh\nprintf '%s\\n' \"$WINEPREFIX\" \"$CTHULHU_WINE_ACCESS_MANAGED\" \"$DBUS_SESSION_BUS_ADDRESS\" \"$DISPLAY\" > \"$CTHULHU_TEST_WINE_OUTPUT.tmp\"\nmv \"$CTHULHU_TEST_WINE_OUTPUT.tmp\" \"$CTHULHU_TEST_WINE_OUTPUT\"\nexec sleep 30\n"
if err := os.WriteFile(helper, []byte(script), 0700); err != nil {
t.Fatal(err)
}
+2 -1
View File
@@ -226,7 +226,8 @@ func TestManagerLaunchesAndStopsHelperForActivePrefix(t *testing.T) {
t.Setenv("CTHULHU_TEST_WINE_OUTPUT", output)
t.Setenv("DBUS_SESSION_BUS_ADDRESS", "unix:path=/reader-bus")
helper := filepath.Join(root, "helper")
script := "#!/bin/sh\nprintf '%s\\n' \"$WINEPREFIX\" \"$CTHULHU_WINE_ACCESS_MANAGED\" \"$DBUS_SESSION_BUS_ADDRESS\" \"$DISPLAY\" > \"$CTHULHU_TEST_WINE_OUTPUT\"\nexec sleep 30\n"
// Publish the complete environment atomically; printf can issue multiple writes.
script := "#!/bin/sh\nprintf '%s\\n' \"$WINEPREFIX\" \"$CTHULHU_WINE_ACCESS_MANAGED\" \"$DBUS_SESSION_BUS_ADDRESS\" \"$DISPLAY\" > \"$CTHULHU_TEST_WINE_OUTPUT.tmp\"\nmv \"$CTHULHU_TEST_WINE_OUTPUT.tmp\" \"$CTHULHU_TEST_WINE_OUTPUT\"\nexec sleep 30\n"
if err := os.WriteFile(helper, []byte(script), 0700); err != nil {
t.Fatal(err)
}