qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests/avocado: Move common Avocado tags to class


From: Philippe Mathieu-Daudé
Subject: [PATCH] tests/avocado: Move common Avocado tags to class
Date: Fri, 19 Jul 2024 17:13:10 +0200

When Avocado tags apply to all tests in a class,
we can define them once in the class: they will
be applied to all test methods.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 tests/avocado/boot_linux.py           |  2 +-
 tests/avocado/boot_xen.py             | 17 +----------------
 tests/avocado/machine_aarch64_virt.py | 10 ++++------
 3 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py
index cdce4cbcba..df6cf209ef 100644
--- a/tests/avocado/boot_linux.py
+++ b/tests/avocado/boot_linux.py
@@ -64,12 +64,12 @@ def test_pc_q35_kvm(self):
 class BootLinuxAarch64(LinuxTest):
     """
     :avocado: tags=arch:aarch64
-    :avocado: tags=machine:virt
     """
     timeout = 720
 
     def test_virt_kvm(self):
         """
+        :avocado: tags=machine:virt
         :avocado: tags=accel:kvm
         :avocado: tags=cpu:host
         """
diff --git a/tests/avocado/boot_xen.py b/tests/avocado/boot_xen.py
index fc2faeedb5..93bfb0c161 100644
--- a/tests/avocado/boot_xen.py
+++ b/tests/avocado/boot_xen.py
@@ -61,8 +61,6 @@ def launch_xen(self, xen_path):
 
 
 class BootXen(BootXenBase):
-
-    def test_arm64_xen_411_and_dom0(self):
         """
         :avocado: tags=arch:aarch64
         :avocado: tags=accel:tcg
@@ -70,6 +68,7 @@ def test_arm64_xen_411_and_dom0(self):
         :avocado: tags=machine:virt
         """
 
+    def test_arm64_xen_411_and_dom0(self):
         # archive of file from https://deb.debian.org/debian/pool/main/x/xen/
         xen_url = ('https://fileserver.linaro.org/s/JSsewXGZ6mqxPr5/'
                    'download?path=%2F&files='
@@ -81,13 +80,6 @@ def test_arm64_xen_411_and_dom0(self):
         self.launch_xen(xen_path)
 
     def test_arm64_xen_414_and_dom0(self):
-        """
-        :avocado: tags=arch:aarch64
-        :avocado: tags=accel:tcg
-        :avocado: tags=cpu:cortex-a57
-        :avocado: tags=machine:virt
-        """
-
         # archive of file from https://deb.debian.org/debian/pool/main/x/xen/
         xen_url = ('https://fileserver.linaro.org/s/JSsewXGZ6mqxPr5/'
                    'download?path=%2F&files='
@@ -99,13 +91,6 @@ def test_arm64_xen_414_and_dom0(self):
         self.launch_xen(xen_path)
 
     def test_arm64_xen_415_and_dom0(self):
-        """
-        :avocado: tags=arch:aarch64
-        :avocado: tags=accel:tcg
-        :avocado: tags=cpu:cortex-a57
-        :avocado: tags=machine:virt
-        """
-
         xen_url = ('https://fileserver.linaro.org/'
                    's/JSsewXGZ6mqxPr5/download'
                    '?path=%2F&files=xen-upstream-4.15-unstable.deb')
diff --git a/tests/avocado/machine_aarch64_virt.py 
b/tests/avocado/machine_aarch64_virt.py
index a90dc6ff4b..0ef6df4b0d 100644
--- a/tests/avocado/machine_aarch64_virt.py
+++ b/tests/avocado/machine_aarch64_virt.py
@@ -20,6 +20,10 @@
 from avocado.utils.path import find_command
 
 class Aarch64VirtMachine(QemuSystemTest):
+    """
+    :avocado: tags=arch:aarch64
+    :avocado: tags=machine:virt
+    """
     KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
     timeout = 360
 
@@ -33,8 +37,6 @@ def wait_for_console_pattern(self, success_message, vm=None):
     # Other test profiles should use more minimal boots
     def test_alpine_virt_tcg_gic_max(self):
         """
-        :avocado: tags=arch:aarch64
-        :avocado: tags=machine:virt
         :avocado: tags=accel:tcg
         """
         iso_url = ('https://dl-cdn.alpinelinux.org/'
@@ -129,8 +131,6 @@ def common_aarch64_virt(self, machine):
 
     def test_aarch64_virt_gicv3(self):
         """
-        :avocado: tags=arch:aarch64
-        :avocado: tags=machine:virt
         :avocado: tags=accel:tcg
         :avocado: tags=cpu:max
         """
@@ -138,8 +138,6 @@ def test_aarch64_virt_gicv3(self):
 
     def test_aarch64_virt_gicv2(self):
         """
-        :avocado: tags=arch:aarch64
-        :avocado: tags=machine:virt
         :avocado: tags=accel:tcg
         :avocado: tags=cpu:max
         """
-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]