commit 7d62649bd30797f85379561d2c471a10d802bbac
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Apr 28 14:42:24 2025 +0200

    tests: Let user specify a kernel to test

commit 4401af9bcc5dc95c0d58b3b0750e81f964b66314
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Apr 28 14:45:27 2025 +0200

    tests: make test-multiboot.in also take GNUMACH into account

commit 780d2561b24aa317bbdf84effda177d775f852af
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Apr 28 15:06:32 2025 +0200

    tests: Also support test kernel not being called gnumach

commit 340ed32cc45e0ada8d57492beec6c857434cab3d
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Apr 28 15:08:10 2025 +0200

    tests: Fix copying files

---
 tests/Makefrag.am       |    4 ++++
 tests/test-multiboot.in |    3 ++-
 tests/user-qemu.mk      |    4 ++--
 3 files changed, 8 insertions(+), 3 deletions(-)

--- a/tests/user-qemu.mk
+++ b/tests/user-qemu.mk
@@ -176,7 +176,7 @@ QEMU_BIN = qemu-system-x86_64
 QEMU_OPTS += -cpu core2duo-v1
 endif
 
-tests/test-%.iso: tests/module-% gnumach $(srcdir)/tests/grub.cfg.single.template
+tests/test-%.iso: tests/module-% $(GNUMACH) $(srcdir)/tests/grub.cfg.single.template
 	rm -rf $(builddir)/tests/isofiles-$*
 	mkdir -p $(builddir)/tests/isofiles-$*/boot/grub/
 	< $(srcdir)/tests/grub.cfg.single.template		\
@@ -184,7 +184,7 @@ tests/test-%.iso: tests/module-% gnumach
 		    -e "s/GNUMACHARGS/$(GNUMACH_ARGS)/g"	\
 		    -e "s/TEST_START_MARKER/$(TEST_START_MARKER)/g"	\
 		>$(builddir)/tests/isofiles-$*/boot/grub/grub.cfg
-	cp gnumach $< $(builddir)/tests/isofiles-$*/boot/
+	cp $(GNUMACH) $< $(builddir)/tests/isofiles-$*/boot/gnumach
 	grub-mkrescue -o $@ $(builddir)/tests/isofiles-$*
 	rm -rf $(builddir)/tests/isofiles-$*
 
--- a/tests/Makefrag.am
+++ b/tests/Makefrag.am
@@ -22,6 +22,10 @@
 
 if !PLATFORM_xen
 
+# Let user specify a kernel to test
+GNUMACH ?= gnumach
+export GNUMACH
+
 .NOTPARALLEL: check
 
 include tests/user-qemu.mk
--- a/tests/test-multiboot.in
+++ b/tests/test-multiboot.in
@@ -18,8 +18,9 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
+[ -n "$GNUMACH" ] || GNUMACH=gnumach
 if grub-file --help > /dev/null 2>&1
-then grub-file --is-x86-multiboot gnumach
+then grub-file --is-x86-multiboot $GNUMACH
 else
   # `grub-file' is not available -- ignore this test.
   exit 77
diff --git a/tests/user-qemu.mk b/tests/user-qemu.mk
index 0c470ba2..c658ca21 100644
--- a/tests/user-qemu.mk
+++ b/tests/user-qemu.mk
@@ -184,7 +184,8 @@ tests/test-%.iso: tests/module-% $(GNUMACH) $(srcdir)/tests/grub.cfg.single.temp
 		    -e "s/GNUMACHARGS/$(GNUMACH_ARGS)/g"	\
 		    -e "s/TEST_START_MARKER/$(TEST_START_MARKER)/g"	\
 		>$(builddir)/tests/isofiles-$*/boot/grub/grub.cfg
-	cp $(GNUMACH) $< $(builddir)/tests/isofiles-$*/boot/gnumach
+	cp $(GNUMACH) $(builddir)/tests/isofiles-$*/boot/gnumach
+	cp $< $(builddir)/tests/isofiles-$*/boot/
 	grub-mkrescue -o $@ $(builddir)/tests/isofiles-$*
 	rm -rf $(builddir)/tests/isofiles-$*
 
