From 7afed76f061d625805efb004b27374494f57779d Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 18 Jul 2026 00:45:48 +0200 Subject: [PATCH] Create symlinks to host binaries on Wine targets to run test commands natively --- Makefile.am | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 6d246825..5ca90827 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,7 @@ bin_PROGRAMS = snapraid check_PROGRAMS = mktest mkstream checker AM_CPPFLAGS = -DSYSCONFDIR="\"${sysconfdir}\"" +CLEANFILES = if HAVE_DISK_ARBITRATION snapraid_LDFLAGS = -framework CoreFoundation -framework DiskArbitration @@ -18,7 +19,7 @@ mkstream_LDADD = -ladvapi32 -luserenv resource_res.o: cmdline/resource.rc cmdline/resource.manifest $(WINDRES) --include-dir=. --include-dir=$(srcdir) $< -o $@ -CLEANFILES = resource_res.o +CLEANFILES += resource_res.o endif snapraid_SOURCES = \ @@ -330,10 +331,18 @@ SNAP = $(srcdir)/test/test-snap.conf MSG = @echo ===== SNAPRAID = ./checker$(EXEEXT) +CLEANFILES += rm.exe mv.exe touch.exe + setupcheck: rm -rf bench rm -f test.log + rm -f rm.exe mv.exe touch.exe mkdir bench +if !HAVE_POSIX + ln -sf $$(which rm) rm.exe + ln -sf $$(which mv) mv.exe + ln -sf $$(which touch) touch.exe +endif # Not included in main check because it requires root permissions snapcheck: mktest checker setupcheck