aboutsummaryrefslogtreecommitdiff
path: root/tests/avocado/avocado_qemu
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-09-27 18:14:33 +0200
committerPhilippe Mathieu-Daudé <philmd@redhat.com>2021-11-08 17:00:22 +0100
commit2283b627bc6ba2bc7f120b4e7af0e43503282bb7 (patch)
treee091172475890ae9b947e25a79cbc6a1e6434ed5 /tests/avocado/avocado_qemu
parent8011837a019182c61bad0d8f3a603d26dd4b6710 (diff)
downloadqemu-2283b627bc6ba2bc7f120b4e7af0e43503282bb7.zip
qemu-2283b627bc6ba2bc7f120b4e7af0e43503282bb7.tar.gz
qemu-2283b627bc6ba2bc7f120b4e7af0e43503282bb7.tar.bz2
tests/avocado: Rename avocado_qemu.Test -> QemuSystemTest
To run user-mode emulation tests, we introduced the avocado_qemu.QemuUserTest which inherits from avocado_qemu.QemuBaseTest. System-mode emulation tests are based on the avocado_qemu.Test class, which also inherits avocado_qemu.QemuBaseTest. To avoid confusion, rename it as avocado_qemu.QemuSystemTest. Suggested-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20211105143416.148332-7-f4bug@amsat.org>
Diffstat (limited to 'tests/avocado/avocado_qemu')
-rw-r--r--tests/avocado/avocado_qemu/__init__.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py
index 1efc22d..75063c0 100644
--- a/tests/avocado/avocado_qemu/__init__.py
+++ b/tests/avocado/avocado_qemu/__init__.py
@@ -176,7 +176,7 @@ def interrupt_interactive_console_until_pattern(test, success_message,
:param test: an Avocado test containing a VM that will have its console
read and probed for a success or failure message
- :type test: :class:`avocado_qemu.Test`
+ :type test: :class:`avocado_qemu.QemuSystemTest`
:param success_message: if this message appears, test succeeds
:param failure_message: if this message appears, test fails
:param interrupt_string: a string to send to the console before trying
@@ -192,7 +192,7 @@ def wait_for_console_pattern(test, success_message, failure_message=None,
:param test: an Avocado test containing a VM that will have its console
read and probed for a success or failure message
- :type test: :class:`avocado_qemu.Test`
+ :type test: :class:`avocado_qemu.QemuSystemTest`
:param success_message: if this message appears, test succeeds
:param failure_message: if this message appears, test fails
"""
@@ -204,7 +204,7 @@ def exec_command(test, command):
the content.
:param test: an Avocado test containing a VM.
- :type test: :class:`avocado_qemu.Test`
+ :type test: :class:`avocado_qemu.QemuSystemTest`
:param command: the command to send
:type command: str
"""
@@ -219,7 +219,7 @@ def exec_command_and_wait_for_pattern(test, command,
:param test: an Avocado test containing a VM that will have its console
read and probed for a success or failure message
- :type test: :class:`avocado_qemu.Test`
+ :type test: :class:`avocado_qemu.QemuSystemTest`
:param command: the command to send
:param success_message: if this message appears, test succeeds
:param failure_message: if this message appears, test fails
@@ -262,11 +262,8 @@ class QemuBaseTest(avocado.Test):
cancel_on_missing=cancel_on_missing)
-class Test(QemuBaseTest):
- """Facilitates system emulation tests.
-
- TODO: Rename this class as `QemuSystemTest`.
- """
+class QemuSystemTest(QemuBaseTest):
+ """Facilitates system emulation tests."""
def setUp(self):
self._vms = {}
@@ -508,11 +505,11 @@ class LinuxDistro:
return self._info.get('kernel_params', None)
-class LinuxTest(LinuxSSHMixIn, Test):
+class LinuxTest(LinuxSSHMixIn, QemuSystemTest):
"""Facilitates having a cloud-image Linux based available.
- For tests that indend to interact with guests, this is a better choice
- to start with than the more vanilla `Test` class.
+ For tests that indent to interact with guests, this is a better choice
+ to start with than the more vanilla `QemuSystemTest` class.
"""
timeout = 900