aboutsummaryrefslogtreecommitdiff
path: root/tests/avocado/avocado_qemu
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@suse.de>2023-02-13 17:29:17 -0300
committerPeter Maydell <peter.maydell@linaro.org>2023-02-16 16:26:17 +0000
commit5ad2d7a97cd9d1ed2527d888d343ee40f1b871f3 (patch)
tree53cca53eed9087d04c0a0fd9c5d361dc9f12ac7a /tests/avocado/avocado_qemu
parent9200d5cc749fe06c52da395d94f39aaa5c380635 (diff)
downloadqemu-5ad2d7a97cd9d1ed2527d888d343ee40f1b871f3.zip
qemu-5ad2d7a97cd9d1ed2527d888d343ee40f1b871f3.tar.gz
qemu-5ad2d7a97cd9d1ed2527d888d343ee40f1b871f3.tar.bz2
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>
Diffstat (limited to 'tests/avocado/avocado_qemu')
-rw-r--r--tests/avocado/avocado_qemu/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py
index 25a5468..a313e88 100644
--- a/tests/avocado/avocado_qemu/__init__.py
+++ b/tests/avocado/avocado_qemu/__init__.py
@@ -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'))