From: Harald Hoyer Date: Tue, 3 Feb 2015 09:43:24 +0000 (+0100) Subject: test-functions: search for the initrd and kernel according to the BLS X-Git-Tag: v219~172 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=b6f0c419e38a960873fe68bf8f89bbb0268eed02;ds=sidebyside 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. --- 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