summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-05-21 19:00:20 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-27 10:47:09 +0100
commit662c688e635f4490aac0d6d34ce7a7b31d73f5c5 (patch)
tree32c5190457a65027579cba22b1542f1784c5da90 /meta/lib/oeqa/selftest
parent0e0113c350e599f4da00eda384570e0db04f3b5d (diff)
downloadopenembedded-core-contrib-662c688e635f4490aac0d6d34ce7a7b31d73f5c5.tar.gz
qemu: enable virglrenderer and glx options subject to 'opengl' DISTRO_FEATURE
Note that to actually use accelerated GL passthrough, there are two options 1) a suitable frontend need to be also enabled - gtk+ and SDL both seem to work well. Previously I struggled to make SDL work, but now it seems fine. 2) it is also possible to render off-screen with -display egl-headless option, and see the output with a VNC viewer (for which, qemu needs to be started with a VNC server): $ runqemu kvm egl-headless publicvnc Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/cases/runtime_test.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 09d3de7aea..793c98a335 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -188,18 +188,14 @@ class TestImage(OESelftestTestCase):
self.skipTest('virgl isn\'t working with Opensuse 15.0')
qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
- sdl_packageconfig = get_bb_var('PACKAGECONFIG', 'libsdl2-native')
+ qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
features = 'INHERIT += "testimage"\n'
if 'gtk+' not in qemu_packageconfig:
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"\n'
if 'sdl' not in qemu_packageconfig:
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " sdl"\n'
- if 'virglrenderer' not in qemu_packageconfig:
- features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n'
- if 'glx' not in qemu_packageconfig:
- features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n'
- if 'opengl' not in sdl_packageconfig:
- features += 'PACKAGECONFIG_append_pn-libsdl2-native = " opengl"\n'
+ if 'opengl' not in qemu_distrofeatures:
+ features += 'DISTRO_FEATURES_append = " opengl"\n'
features += 'TEST_SUITES = "ping ssh virgl"\n'
features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
features += 'IMAGE_INSTALL_append = " kmscube"\n'
@@ -231,12 +227,10 @@ class TestImage(OESelftestTestCase):
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.")
- qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
+ qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
features = 'INHERIT += "testimage"\n'
- if 'virglrenderer' not in qemu_packageconfig:
- features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n'
- if 'glx' not in qemu_packageconfig:
- features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n'
+ if 'opengl' not in qemu_distrofeatures:
+ features += 'DISTRO_FEATURES_append = " opengl"\n'
features += 'TEST_SUITES = "ping ssh virgl"\n'
features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
features += 'IMAGE_INSTALL_append = " kmscube"\n'