Fix tests for OpenBSD

Using the diff provided by @krobelus on #5173

Close #5173
This commit is contained in:
Maxime Coste 2024-05-12 11:14:17 +10:00
parent 8c2775f665
commit 7be22f1ec2
2 changed files with 5 additions and 1 deletions

View File

@ -54,7 +54,7 @@ LDFLAGS-os-FreeBSD = -L/usr/local/lib
LIBS-os-Haiku = -lnetwork -lbe
CPPFLAGS-os-OpenBSD = -DKAK_BIN_PATH="$(bindir)/kak" -I/usr/local/include
CPPFLAGS-os-OpenBSD = -DKAK_BIN_PATH=\"$(bindir)/kak\" -I/usr/local/include
LDFLAGS-os-OpenBSD = -L/usr/local/lib
mandir-os-OpenBSD = $(DESTDIR)$(PREFIX)/man/man1
@ -136,6 +136,9 @@ doc/kak.1.gz: doc/kak.1
check: test
test: src/kak
if [ $(os) = OpenBSD ]; then \
export KAKOUNE_RUNTIME=$$PWD/share/kak; \
fi && \
cd test && ./run
TAGS: tags

View File

@ -666,6 +666,7 @@ String get_kak_binary_path()
buffer[res] = '\0';
return buffer;
#elif defined(__OpenBSD__)
(void)buffer;
return KAK_BIN_PATH;
#elif defined(__sun__)
ssize_t res = readlink("/proc/self/path/a.out", buffer, 2048);