mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 12:53:53 -06:00
docs/devel/testing: Rename avocado_qemu.Test class
The avocado_qemu.Test class has been renamed a while back in commit
2283b627bc
("tests/avocado: Rename avocado_qemu.Test -> QemuSystemTest"),
so we should reflect this now in the documentation, too.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20240830133841.142644-44-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
2133c2ab9c
commit
0abdd97084
1 changed files with 16 additions and 16 deletions
|
@ -8,11 +8,11 @@ The ``tests/avocado`` directory hosts integration tests. They're usually
|
||||||
higher level tests, and may interact with external resources and with
|
higher level tests, and may interact with external resources and with
|
||||||
various guest operating systems.
|
various guest operating systems.
|
||||||
|
|
||||||
These tests are written using the Avocado Testing Framework (which must
|
These tests are written using the Avocado Testing Framework (which must be
|
||||||
be installed separately) in conjunction with a the ``avocado_qemu.Test``
|
installed separately) in conjunction with a the ``avocado_qemu.QemuSystemTest``
|
||||||
class, implemented at ``tests/avocado/avocado_qemu``.
|
class, implemented at ``tests/avocado/avocado_qemu``.
|
||||||
|
|
||||||
Tests based on ``avocado_qemu.Test`` can easily:
|
Tests based on ``avocado_qemu.QemuSystemTest`` can easily:
|
||||||
|
|
||||||
* Customize the command line arguments given to the convenience
|
* Customize the command line arguments given to the convenience
|
||||||
``self.vm`` attribute (a QEMUMachine instance)
|
``self.vm`` attribute (a QEMUMachine instance)
|
||||||
|
@ -154,7 +154,7 @@ Overview
|
||||||
--------
|
--------
|
||||||
|
|
||||||
The ``tests/avocado/avocado_qemu`` directory provides the
|
The ``tests/avocado/avocado_qemu`` directory provides the
|
||||||
``avocado_qemu`` Python module, containing the ``avocado_qemu.Test``
|
``avocado_qemu`` Python module, containing the ``avocado_qemu.QemuSystemTest``
|
||||||
class. Here's a simple usage example:
|
class. Here's a simple usage example:
|
||||||
|
|
||||||
.. code::
|
.. code::
|
||||||
|
@ -186,11 +186,11 @@ in the current directory, tagged as "quick", run:
|
||||||
|
|
||||||
avocado run -t quick .
|
avocado run -t quick .
|
||||||
|
|
||||||
The ``avocado_qemu.Test`` base test class
|
The ``avocado_qemu.QemuSystemTest`` base test class
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The ``avocado_qemu.Test`` class has a number of characteristics that
|
The ``avocado_qemu.QemuSystemTest`` class has a number of characteristics
|
||||||
are worth being mentioned right away.
|
that are worth being mentioned right away.
|
||||||
|
|
||||||
First of all, it attempts to give each test a ready to use QEMUMachine
|
First of all, it attempts to give each test a ready to use QEMUMachine
|
||||||
instance, available at ``self.vm``. Because many tests will tweak the
|
instance, available at ``self.vm``. Because many tests will tweak the
|
||||||
|
@ -233,15 +233,15 @@ and hypothetical example follows:
|
||||||
|
|
||||||
self.assertEqual(first_res, second_res, third_res)
|
self.assertEqual(first_res, second_res, third_res)
|
||||||
|
|
||||||
At test "tear down", ``avocado_qemu.Test`` handles all the QEMUMachines
|
At test "tear down", ``avocado_qemu.QemuSystemTest`` handles all the
|
||||||
shutdown.
|
QEMUMachines shutdown.
|
||||||
|
|
||||||
The ``avocado_qemu.LinuxTest`` base test class
|
The ``avocado_qemu.LinuxTest`` base test class
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The ``avocado_qemu.LinuxTest`` is further specialization of the
|
The ``avocado_qemu.LinuxTest`` is further specialization of the
|
||||||
``avocado_qemu.Test`` class, so it contains all the characteristics of
|
``avocado_qemu.QemuSystemTest`` class, so it contains all the characteristics
|
||||||
the later plus some extra features.
|
of the later plus some extra features.
|
||||||
|
|
||||||
First of all, this base class is intended for tests that need to
|
First of all, this base class is intended for tests that need to
|
||||||
interact with a fully booted and operational Linux guest. At this
|
interact with a fully booted and operational Linux guest. At this
|
||||||
|
@ -298,7 +298,7 @@ the following approaches:
|
||||||
working directory, or in the current source tree.
|
working directory, or in the current source tree.
|
||||||
|
|
||||||
The resulting ``qemu_bin`` value will be preserved in the
|
The resulting ``qemu_bin`` value will be preserved in the
|
||||||
``avocado_qemu.Test`` as an attribute with the same name.
|
``avocado_qemu.QemuSystemTest`` as an attribute with the same name.
|
||||||
|
|
||||||
Attribute reference
|
Attribute reference
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -308,7 +308,7 @@ Test
|
||||||
|
|
||||||
Besides the attributes and methods that are part of the base
|
Besides the attributes and methods that are part of the base
|
||||||
``avocado.Test`` class, the following attributes are available on any
|
``avocado.Test`` class, the following attributes are available on any
|
||||||
``avocado_qemu.Test`` instance.
|
``avocado_qemu.QemuSystemTest`` instance.
|
||||||
|
|
||||||
vm
|
vm
|
||||||
""
|
""
|
||||||
|
@ -365,7 +365,7 @@ source tree.
|
||||||
LinuxTest
|
LinuxTest
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|
||||||
Besides the attributes present on the ``avocado_qemu.Test`` base
|
Besides the attributes present on the ``avocado_qemu.QemuSystemTest`` base
|
||||||
class, the ``avocado_qemu.LinuxTest`` adds the following attributes:
|
class, the ``avocado_qemu.LinuxTest`` adds the following attributes:
|
||||||
|
|
||||||
distro
|
distro
|
||||||
|
@ -446,7 +446,7 @@ The exact QEMU binary to be used on QEMUMachine.
|
||||||
LinuxTest
|
LinuxTest
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|
||||||
Besides the parameters present on the ``avocado_qemu.Test`` base
|
Besides the parameters present on the ``avocado_qemu.QemuSystemTest`` base
|
||||||
class, the ``avocado_qemu.LinuxTest`` adds the following parameters:
|
class, the ``avocado_qemu.LinuxTest`` adds the following parameters:
|
||||||
|
|
||||||
distro
|
distro
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue