[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 02/11] tests/acceptance: refactor boot_linux_console test to a
From: |
Pavel Dovgalyuk |
Subject: |
[PATCH v2 02/11] tests/acceptance: refactor boot_linux_console test to allow code reuse |
Date: |
Wed, 27 May 2020 13:30:49 +0300 |
User-agent: |
StGit/0.17.1-dirty |
This patch splits code in BootLinuxConsole class into two different
classes to allow reusing it by record/replay tests.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
0 files changed
diff --git a/tests/acceptance/boot_linux_console.py
b/tests/acceptance/boot_linux_console.py
index c6b06a1a13..f23c5833b7 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -28,19 +28,13 @@ try:
except CmdNotFoundError:
P7ZIP_AVAILABLE = False
-class BootLinuxConsole(Test):
- """
- Boots a Linux kernel and checks that the console is operational and the
- kernel command line is properly passed from QEMU to the kernel
- """
-
- timeout = 90
-
+class LinuxKernelUtils(Test):
KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
- def wait_for_console_pattern(self, success_message):
+ def wait_for_console_pattern(self, success_message, vm=None):
wait_for_console_pattern(self, success_message,
- failure_message='Kernel panic - not syncing')
+ failure_message='Kernel panic - not syncing',
+ vm=vm)
def extract_from_deb(self, deb, path):
"""
@@ -79,6 +73,13 @@ class BootLinuxConsole(Test):
os.chdir(cwd)
return os.path.normpath(os.path.join(self.workdir, path))
+class BootLinuxConsole(LinuxKernelUtils):
+ """
+ Boots a Linux kernel and checks that the console is operational and the
+ kernel command line is properly passed from QEMU to the kernel
+ """
+ timeout = 90
+
def test_x86_64_pc(self):
"""
:avocado: tags=arch:x86_64
[PATCH v2 04/11] tests/acceptance: add kernel record/replay test for x86_64, Pavel Dovgalyuk, 2020/05/27