summaryrefslogtreecommitdiff
path: root/test/test-functions
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-functions')
-rw-r--r--test/test-functions8
1 files changed, 8 insertions, 0 deletions
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