tests/avocado: Move common Avocado tags to class
PATCH 1/1 tests/avocado: Move common Avocado tags to class
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é <[email protected]>
--- 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(-)
tests/avocado/boot_linux.py +1 -1
@@ -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 """
tests/avocado/boot_xen.py +1 -16
@@ -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')
tests/avocado/machine_aarch64_virt.py +4 -6
@@ -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 """
Signature · 1 line
2.41.0
Quoted 19 lines · Philippe Mathieu-Daudé
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é <[email protected]>--- 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(-)tests/avocado/boot_linux.py +0
-0@@ -64,12 +64,12 @@ def test_pc_q35_kvm(self): class BootLinuxAarch64(LinuxTest): """ :avocado: tags=arch:aarch64
tests/avocado/boot_linux.py def test_pc_q35_kvm(self): · line 75
Quoted 10 lines
tests/avocado/boot_linux.py +1
-1- :avocado: tags=machine:virt """ timeout = 720 def test_virt_kvm(self): """ + :avocado: tags=machine:virt :avocado: tags=accel:kvm :avocado: tags=cpu:host """
This change seems to contradict your patch description?
Thomas