1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 13:49:49 +00:00

oe-selftest: extend virgl gtk test to also check the SDL option

(From OE-Core rev: 909dc047790efad8304d9c6630c39f6a6b4166fb)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2019-11-18 15:28:42 +01:00
committed by Richard Purdie
parent 63ad134e3d
commit 469f6ee0bb
+13 -4
View File
@@ -166,9 +166,9 @@ class TestImage(OESelftestTestCase):
bitbake('core-image-full-cmdline socat') bitbake('core-image-full-cmdline socat')
bitbake('-c testimage core-image-full-cmdline') bitbake('-c testimage core-image-full-cmdline')
def test_testimage_virgl_gtk(self): def test_testimage_virgl_gtk_sdl(self):
""" """
Summary: Check host-assisted accelerate OpenGL functionality in qemu with gtk frontend Summary: Check host-assisted accelerate OpenGL functionality in qemu with gtk and SDL frontends
Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled
2. Check that kmscube demo runs without crashing. 2. Check that kmscube demo runs without crashing.
Product: oe-core Product: oe-core
@@ -183,18 +183,27 @@ class TestImage(OESelftestTestCase):
self.skipTest('virgl isn\'t working with Centos 7') self.skipTest('virgl isn\'t working with Centos 7')
qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native') qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
sdl_packageconfig = get_bb_var('PACKAGECONFIG', 'libsdl2-native')
features = 'INHERIT += "testimage"\n' features = 'INHERIT += "testimage"\n'
if 'gtk+' not in qemu_packageconfig: if 'gtk+' not in qemu_packageconfig:
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"\n' 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: if 'virglrenderer' not in qemu_packageconfig:
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n' features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n'
if 'glx' not in qemu_packageconfig: if 'glx' not in qemu_packageconfig:
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n' features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n'
if 'opengl' not in sdl_packageconfig:
features += 'PACKAGECONFIG_append_pn-libsdl2-native = " opengl"\n'
features += 'TEST_SUITES = "ping ssh virgl"\n' features += 'TEST_SUITES = "ping ssh virgl"\n'
features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n' features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
features += 'IMAGE_INSTALL_append = " kmscube"\n' features += 'IMAGE_INSTALL_append = " kmscube"\n'
features += 'TEST_RUNQEMUPARAMS = "gtk gl"\n' features_gtk = features + 'TEST_RUNQEMUPARAMS = "gtk gl"\n'
self.write_config(features) self.write_config(features_gtk)
bitbake('core-image-minimal')
bitbake('-c testimage core-image-minimal')
features_sdl = features + 'TEST_RUNQEMUPARAMS = "sdl gl"\n'
self.write_config(features_sdl)
bitbake('core-image-minimal') bitbake('core-image-minimal')
bitbake('-c testimage core-image-minimal') bitbake('-c testimage core-image-minimal')