Skip to contentSkip to conversation

weston.py: added xwayland test

PATCH New Sebastian Suesens 1 participant 3 messages Jun 14, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 weston.py: added xwayland test

From: ssuesens <[email protected]>

Test xwayland support if DISTRO_FEATURE X11 is enabled

Test checked if xserver listening on display

---
 meta/lib/oeqa/runtime/cases/weston.py | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/lib/oeqa/runtime/cases/weston.py +8 -0
index b81cc299ef..1fd471e611 100644
@@ -77,3 +77,11 @@ class WestonTest(OERuntimeTestCase):
                 self.target.run('kill -9 %s' % w)
         __, weston_log = self.target.run('cat %s' % self.weston_log_file)
         self.assertTrue(new_wl_processes, msg='Could not get new weston-desktop-shell processes (%s, try_cnt:%s) weston log: %s' % (new_wl_processes, try_cnt, weston_log))
+
+    @skipIfNotFeature('x11', 'Test requires x11 to be in DISTRO_FEATURES')
+    @OEHasPackage(['weston'])
+    def test_weston_supports_xwayland(self):
+        cmd ='cat %s | grep "xserver listening on display"' % self.weston_log_file
+        status, output = self.target.run(cmd)
+        msg = ('xwayland does not appear to be running')
+        self.assertEqual(status, 0, msg=msg)
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 2/3 [master} weston.init: enabled xwayland

From: ssuesens <[email protected]>

set xwayland support in weston.init file to true

---
 meta/recipes-graphics/wayland/weston-init.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-graphics/wayland/weston-init.bb +4 -0
index 497d860203..77dda03cf5 100644
@@ -50,6 +50,10 @@ do_install() {
 		sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini
 	fi
 
+	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'yes', 'no', d)}" = "yes" ]; then
+		sed -i -e "/^\[core\]/a xwayland=true" ${D}${sysconfdir}/xdg/weston/weston.ini
+	fi
+
 	if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 'no', d)}" = "yes" ]; then
 		sed -i -e "/^\[core\]/a idle-time=0" ${D}${sysconfdir}/xdg/weston/weston.ini
 	fi
Signature · 1 line
2.25.1
#2 lore raw

PATCH v2 3/3 xwayland.weston-start: adaption of X11-unix folder

In reply to Sebastian Suesens

From: ssuesens <[email protected]>

changed permission of X11-unix to 775
changed owner of X11-unix to root:video

---
 meta/recipes-graphics/wayland/weston/xwayland.weston-start | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-graphics/wayland/weston/xwayland.weston-start +2 -1
index db384b1a53..342ac8d129 100644
@@ -1,5 +1,6 @@
 #!/bin/sh
 
 if type Xwayland  >/dev/null 2>/dev/null; then
-	mkdir -p /tmp/.X11-unix
+	mkdir -m 775 -p /tmp/.X11-unix
+	chown root:video /tmp/.X11-unix
 fi
Signature · 1 line
2.25.1