summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/runtime_test.py
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-10-27 11:07:29 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-28 14:16:31 +0100
commit77c631a6f98ec6cc76a461f910cd5cef5471c210 (patch)
treeca759a669aa8b2f8420a6753582c92ea84ad0a8b /meta/lib/oeqa/selftest/cases/runtime_test.py
parentaae23182ef16274d55ecc2044e477df90e6bb339 (diff)
downloadpoky-77c631a6f98ec6cc76a461f910cd5cef5471c210.tar.gz
virgl: skip headless test on specific older distros and fail otherwise
This allows catching failures on new build hosts, instead of quietly skipping the test due to incomplete host setup. (From OE-Core rev: c93f95f2e48a2bba76b231692f2c15bb32005132) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/runtime_test.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/runtime_test.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 129503de63..a90f62bfe1 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -213,17 +213,21 @@ class TestImage(OESelftestTestCase):
213 """ 213 """
214 import subprocess, os 214 import subprocess, os
215 215
216 distro = oe.lsb.distro_identifier()
217 if distro and distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'ubuntu-16.04', 'ubuntu-18.04']:
218 self.skipTest('virgl headless cannot be tested with %s' %(distro))
219
216 render_hint = """If /dev/dri/renderD* is absent due to lack of suitable GPU, 'modprobe vgem' will create one sutable for mesa llvmpipe sofware renderer.""" 220 render_hint = """If /dev/dri/renderD* is absent due to lack of suitable GPU, 'modprobe vgem' will create one sutable for mesa llvmpipe sofware renderer."""
217 try: 221 try:
218 content = os.listdir("/dev/dri") 222 content = os.listdir("/dev/dri")
219 if len([i for i in content if i.startswith('render')]) == 0: 223 if len([i for i in content if i.startswith('render')]) == 0:
220 self.skipTest("No render nodes found in /dev/dri: %s. %s" %(content, render_hint)) 224 self.fail("No render nodes found in /dev/dri: %s. %s" %(content, render_hint))
221 except FileNotFoundError: 225 except FileNotFoundError:
222 self.skipTest("/dev/dri directory does not exist; no render nodes available on this machine. %s" %(render_hint)) 226 self.fail("/dev/dri directory does not exist; no render nodes available on this machine. %s" %(render_hint))
223 try: 227 try:
224 dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True) 228 dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True)
225 except subprocess.CalledProcessError as e: 229 except subprocess.CalledProcessError as e:
226 self.skipTest("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.") 230 self.fail("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
227 qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native') 231 qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
228 features = 'INHERIT += "testimage"\n' 232 features = 'INHERIT += "testimage"\n'
229 if 'opengl' not in qemu_distrofeatures: 233 if 'opengl' not in qemu_distrofeatures: