summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/runtime_test.py
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 11:04:47 +0100
commit7561eb32a01f7990ad4a4606ac97ebe2a659e029 (patch)
tree4d47ffaa939ec8198c7f586fcb84209273c7b081 /meta/lib/oeqa/selftest/cases/runtime_test.py
parent08a3d674e05786b81f2062e24d8b0127f00237c7 (diff)
downloadpoky-7561eb32a01f7990ad4a4606ac97ebe2a659e029.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 (From OE-Core rev: 662c688e635f4490aac0d6d34ce7a7b31d73f5c5) 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/cases/runtime_test.py')
-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):
188 self.skipTest('virgl isn\'t working with Opensuse 15.0') 188 self.skipTest('virgl isn\'t working with Opensuse 15.0')
189 189
190 qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native') 190 qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
191 sdl_packageconfig = get_bb_var('PACKAGECONFIG', 'libsdl2-native') 191 qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
192 features = 'INHERIT += "testimage"\n' 192 features = 'INHERIT += "testimage"\n'
193 if 'gtk+' not in qemu_packageconfig: 193 if 'gtk+' not in qemu_packageconfig:
194 features += 'PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"\n' 194 features += 'PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"\n'
195 if 'sdl' not in qemu_packageconfig: 195 if 'sdl' not in qemu_packageconfig:
196 features += 'PACKAGECONFIG_append_pn-qemu-system-native = " sdl"\n' 196 features += 'PACKAGECONFIG_append_pn-qemu-system-native = " sdl"\n'
197 if 'virglrenderer' not in qemu_packageconfig: 197 if 'opengl' not in qemu_distrofeatures:
198 features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n' 198 features += 'DISTRO_FEATURES_append = " opengl"\n'
199 if 'glx' not in qemu_packageconfig:
200 features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n'
201 if 'opengl' not in sdl_packageconfig:
202 features += 'PACKAGECONFIG_append_pn-libsdl2-native = " opengl"\n'
203 features += 'TEST_SUITES = "ping ssh virgl"\n' 199 features += 'TEST_SUITES = "ping ssh virgl"\n'
204 features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n' 200 features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
205 features += 'IMAGE_INSTALL_append = " kmscube"\n' 201 features += 'IMAGE_INSTALL_append = " kmscube"\n'
@@ -231,12 +227,10 @@ class TestImage(OESelftestTestCase):
231 dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True) 227 dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True)
232 except subprocess.CalledProcessError as e: 228 except subprocess.CalledProcessError as e:
233 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.") 229 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.")
234 qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native') 230 qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
235 features = 'INHERIT += "testimage"\n' 231 features = 'INHERIT += "testimage"\n'
236 if 'virglrenderer' not in qemu_packageconfig: 232 if 'opengl' not in qemu_distrofeatures:
237 features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n' 233 features += 'DISTRO_FEATURES_append = " opengl"\n'
238 if 'glx' not in qemu_packageconfig:
239 features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n'
240 features += 'TEST_SUITES = "ping ssh virgl"\n' 234 features += 'TEST_SUITES = "ping ssh virgl"\n'
241 features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n' 235 features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
242 features += 'IMAGE_INSTALL_append = " kmscube"\n' 236 features += 'IMAGE_INSTALL_append = " kmscube"\n'