From b6f0c419e38a960873fe68bf8f89bbb0268eed02 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 3 Feb 2015 10:43:24 +0100 Subject: 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(+) (limited to 'test') diff --git a/test/test-functions b/test/test-functions index 50daedc201..901ff48605 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 -- cgit v1.2.3-54-g00ecf