summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2015-02-03 10:43:24 +0100
committerHarald Hoyer <harald@redhat.com>2015-02-03 10:51:29 +0100
commitb6f0c419e38a960873fe68bf8f89bbb0268eed02 (patch)
treed8619f355eb8c4fe65d1faf789f0e1a4eb39df15 /test
parentedbced8a151c1b7ded685e2ec644950d2adec5f5 (diff)
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.
Diffstat (limited to 'test')
-rw-r--r--test/test-functions8
1 files changed, 8 insertions, 0 deletions
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