From b6f0c419e38a960873fe68bf8f89bbb0268eed02 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 3 Feb 2015 10:43:24 +0100 Subject: [PATCH] test-functions: search for the initrd and kernel according to the BLS Also search for the initrd and kernel according to the boot loader specification. --- test/test-functions | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test-functions b/test/test-functions index 50daedc20..901ff4860 100644 --- a/test/test-functions +++ b/test/test-functions @@ -42,6 +42,14 @@ function find_qemu_bin() { } run_qemu() { + if [ -f /etc/machine-id ]; then + read MACHINE_ID < /etc/machine-id + [ -z "$INITRD" ] && [ -e "/boot/$MACHINE_ID/$KERNEL_VER/initrd" ] \ + && INITRD="/boot/$MACHINE_ID/$KERNEL_VER/initrd" + [ -z "$KERNEL_BIN" ] && [ -e "/boot/$MACHINE_ID/$KERNEL_VER/linux" ] \ + && KERNEL_BIN="/boot/$MACHINE_ID/$KERNEL_VER/linux" + fi + [ "$KERNEL_BIN" ] || KERNEL_BIN=/boot/vmlinuz-$KERNEL_VER [ "$INITRD" ] || INITRD=/boot/initramfs-${KERNEL_VER}.img [ "$QEMU_SMP" ] || QEMU_SMP=1 -- 2.30.2