[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/7] tests/acceptance/virtio-gpu.py: use require_accelerator()
From: |
Cleber Rosa |
Subject: |
[PULL 1/7] tests/acceptance/virtio-gpu.py: use require_accelerator() |
Date: |
Tue, 20 Jul 2021 19:30:12 -0400 |
Since efe30d501 there's a shorthand for requiring specific
accelerators, and canceling the test if it's not available.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210714174051.28164-2-crosa@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/acceptance/virtio-gpu.py | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py
index 589332c1b7..42602a240a 100644
--- a/tests/acceptance/virtio-gpu.py
+++ b/tests/acceptance/virtio-gpu.py
@@ -17,10 +17,6 @@
import subprocess
-ACCEL_NOT_AVAILABLE_FMT = "%s accelerator does not seem to be available"
-KVM_NOT_AVAILABLE = ACCEL_NOT_AVAILABLE_FMT % "KVM"
-
-
def pick_default_vug_bin():
relative_path = "./contrib/vhost-user-gpu/vhost-user-gpu"
if is_readable_executable_file(relative_path):
@@ -66,8 +62,7 @@ def test_virtio_vga_virgl(self):
self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0 rdinit=/bin/bash"
)
# FIXME: should check presence of virtio, virgl etc
- if not kvm_available(self.arch, self.qemu_bin):
- self.cancel(KVM_NOT_AVAILABLE)
+ self.require_accelerator('kvm')
kernel_path = self.fetch_asset(self.KERNEL_URL)
initrd_path = self.fetch_asset(self.INITRD_URL)
@@ -107,8 +102,7 @@ def test_vhost_user_vga_virgl(self):
self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0 rdinit=/bin/bash"
)
# FIXME: should check presence of vhost-user-gpu, virgl, memfd etc
- if not kvm_available(self.arch, self.qemu_bin):
- self.cancel(KVM_NOT_AVAILABLE)
+ self.require_accelerator('kvm')
vug = pick_default_vug_bin()
if not vug:
--
2.31.1
- [PULL for 6.1 0/7] Python and Acceptance Tests, Cleber Rosa, 2021/07/20
- [PULL 1/7] tests/acceptance/virtio-gpu.py: use require_accelerator(),
Cleber Rosa <=
- [PULL 2/7] tests/acceptance/virtio-gpu.py: combine x86_64 arch tags, Cleber Rosa, 2021/07/20
- [PULL 3/7] tests/acceptance/virtio-gpu.py: combine CPU tags, Cleber Rosa, 2021/07/20
- [PULL 4/7] tests/acceptance/virtio-gpu.py: combine kernel command line, Cleber Rosa, 2021/07/20
- [PULL 6/7] tests/acceptance/virtio-gpu.py: provide kernel and initrd hashes, Cleber Rosa, 2021/07/20
- [PULL 5/7] tests/acceptance/virtio-gpu.py: use virtio-vga-gl, Cleber Rosa, 2021/07/20
- [PULL 7/7] remote/memory: Replace share parameter with ram_flags, Cleber Rosa, 2021/07/20
- Re: [PULL for 6.1 0/7] Python and Acceptance Tests, Peter Maydell, 2021/07/21