summaryrefslogtreecommitdiff
path: root/test/test-functions
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-11-20 16:00:32 +0100
committerDaniel Mack <github@zonque.org>2015-11-20 16:00:32 +0100
commitaedf698f3e93b2d376e03b85c471f0f54ccda50d (patch)
treea921b59961c1bf7b0dd0ade73c19a2e427a39d80 /test/test-functions
parent1bd4903c8faab8af259ecb35bbad05d938e250c5 (diff)
parent61fea35e14d84144e6e2122f5cd247f9c7e6245e (diff)
Merge pull request #1966 from evverx/fix-initrd-searching-on-debian
tests: fix initrd searching on Debian/Ubuntu
Diffstat (limited to 'test/test-functions')
-rw-r--r--test/test-functions5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test-functions b/test/test-functions
index a6eea662fc..a794f3556e 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -51,8 +51,11 @@ run_qemu() {
&& KERNEL_BIN="/boot/$MACHINE_ID/$KERNEL_VER/linux"
fi
+ default_fedora_initrd=/boot/initramfs-${KERNEL_VER}.img
+ default_debian_initrd=/boot/initrd.img-${KERNEL_VER}
[ "$KERNEL_BIN" ] || KERNEL_BIN=/boot/vmlinuz-$KERNEL_VER
- [ "$INITRD" ] || INITRD=/boot/initramfs-${KERNEL_VER}.img
+ [ "$INITRD" ] || { [ -e "$default_fedora_initrd" ] && INITRD=$default_fedora_initrd; }
+ [ "$INITRD" ] || { [ "$LOOKS_LIKE_DEBIAN" ] && [ -e "$default_debian_initrd" ] && INITRD=$default_debian_initrd; }
[ "$QEMU_SMP" ] || QEMU_SMP=1
find_qemu_bin || return 1