tests/avocado: Skip tests that require a missing accelerator

If a test was tagged with the "accel" tag and the specified
accelerator it not present in the qemu binary, cancel the test.

We can now write tests without explicit calls to require_accelerator,
just the tag is enough.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Fabiano Rosas 2023-02-13 17:29:17 -03:00 committed by Peter Maydell
parent 9200d5cc74
commit 5ad2d7a97c
1 changed files with 4 additions and 0 deletions

View File

@ -274,6 +274,10 @@ class QemuSystemTest(QemuBaseTest):
super().setUp('qemu-system-')
accel_required = self._get_unique_tag_val('accel')
if accel_required:
self.require_accelerator(accel_required)
self.machine = self.params.get('machine',
default=self._get_unique_tag_val('machine'))