aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/qemu_test/linuxkernel.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/qemu_test/linuxkernel.py')
-rw-r--r--tests/functional/qemu_test/linuxkernel.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/functional/qemu_test/linuxkernel.py b/tests/functional/qemu_test/linuxkernel.py
index fdd5307..2b5b9a5 100644
--- a/tests/functional/qemu_test/linuxkernel.py
+++ b/tests/functional/qemu_test/linuxkernel.py
@@ -17,6 +17,18 @@ class LinuxKernelTest(QemuSystemTest):
failure_message='Kernel panic - not syncing',
vm=vm)
+ def launch_kernel(self, kernel, initrd=None, dtb=None, console_index=0,
+ wait_for=None):
+ self.vm.set_console(console_index=console_index)
+ self.vm.add_args('-kernel', kernel)
+ if initrd:
+ self.vm.add_args('-initrd', initrd)
+ if dtb:
+ self.vm.add_args('-dtb', dtb)
+ self.vm.launch()
+ if wait_for:
+ self.wait_for_console_pattern(wait_for)
+
def extract_from_deb(self, deb_path, path):
"""
Extracts a file from a deb package into the test workdir