diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-10-27 11:07:29 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-28 14:16:26 +0100 |
commit | c93f95f2e48a2bba76b231692f2c15bb32005132 (patch) | |
tree | 6a24e98142a32c4495b57834adc3f36fd8caff2f | |
parent | 95acd86a4aeb8d2122285dd1745c77622462d33f (diff) | |
download | openembedded-core-contrib-c93f95f2e48a2bba76b231692f2c15bb32005132.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.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/runtime_test.py | 10 |
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): """ import subprocess, os + distro = oe.lsb.distro_identifier() + if distro and distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'ubuntu-16.04', 'ubuntu-18.04']: + self.skipTest('virgl headless cannot be tested with %s' %(distro)) + 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.""" try: content = os.listdir("/dev/dri") if len([i for i in content if i.startswith('render')]) == 0: - self.skipTest("No render nodes found in /dev/dri: %s. %s" %(content, render_hint)) + self.fail("No render nodes found in /dev/dri: %s. %s" %(content, render_hint)) except FileNotFoundError: - self.skipTest("/dev/dri directory does not exist; no render nodes available on this machine. %s" %(render_hint)) + self.fail("/dev/dri directory does not exist; no render nodes available on this machine. %s" %(render_hint)) try: dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True) except subprocess.CalledProcessError as e: - 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.") + 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.") qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native') features = 'INHERIT += "testimage"\n' if 'opengl' not in qemu_distrofeatures: |