]> git.ipfire.org Git - thirdparty/qemu.git/commit
tests.acceptance: adds multi vm capability for acceptance tests
authorCaio Carrara <ccarrara@redhat.com>
Tue, 12 Feb 2019 19:38:54 +0000 (17:38 -0200)
committerCleber Rosa <crosa@redhat.com>
Fri, 22 Feb 2019 19:07:01 +0000 (14:07 -0500)
commitb7287d428325705ddf9d9b26d3a7dc2d4ffe837f
tree5d0f0fa45898afea810da5ae5642cc7ff2169cf9
parent10314fb060f2bd42c3fb0f5523edb8dbb0247d00
tests.acceptance: adds multi vm capability for acceptance tests

This change adds the possibility to write acceptance tests with multi
virtual machine support. It's done keeping the virtual machines objects
stored in a test attribute (dictionary). This dictionary shouldn't be
accessed directly but through the new method added `get_vm`. This new
method accept a list of args (that will be added as virtual machine
arguments) and an optional name argument. The name is the key that
identify a single virtual machine along the test machines available. If
a name without a machine is informed a new machine will be instantiated.

The current usage of vm in tests will not be broken by this change since
it keeps a property called vm in the base test class. This property only
calls the new method `get_vm` with default parameters (no args and
'default' as machine name).

Signed-off-by: Caio Carrara <ccarrara@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20190212193855.13223-2-ccarrara@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
docs/devel/testing.rst
tests/acceptance/avocado_qemu/__init__.py