Weston headless backend - xvfb-run emulation

Martin Stransky stransky at redhat.com
Thu Jan 3 14:10:02 UTC 2019


On 12/22/18 10:36 AM, Pekka Paalanen wrote:
> On Fri, 21 Dec 2018 13:00:12 +0100
> Martin Stransky <stransky at redhat.com> wrote:
> 
>> Hi,
>>
>> I'm working on Firefox/Wayland port on Fedora and there's a need to run
>> Wayland Firefox in headless Wayland session - it's used in build process
>> to perform PGO build, it's used for test runs and so. It's generally
>> what xvfb-run provides - a headless X11 server which launches a single
>> command and quit when the command finishes.
>>
>> Is that possible with Weston and any of its backend? I haven't found any
>> reference how to launch firefox inside weston-headles backend
>> automatically so far.
> 
> Hi,
> 
> Weston doesn't have any kind of autolaunch feature, but there are
> interested people at least for the desktop use case.
> 
> Weston's own test suite uses a custom plugin to launch test
> clients, but it's not installed. That might be a better approach
> for a test suite than a generic desktop app autolaunch, since you
> can make the compositor quit and forward the test app exit code.
> 
> That plugin is at tests/weston-test.c, and it implements also a
> test protocol, but the most relevant part for you is
> idle_launch_client(). test_client_sigchld() handles quitting Weston.
> 
> We could think of some kind of arrangement to allow using
> Weston/headless to run automated tests in other projects
> out-of-the-box. Maybe the idle_launch_client() functionality could
> be integrated in the headless backend directly... but then we need
> more changes in Weston's test suite to allow running the tests with
> different backends. Maybe that would be a slightly longer term plan.
> 
> Are you only looking for headless launching of apps, or would you
> be interested in more features like screenshooting or fake input
> events to drive and check tests?

Hello,

Mozilla uses xvfb as a frame buffer X server and launches x11vnc inside 
it. The Firefox itself is controlled by Marionette [1] so there's no 
need for fake input events (AFAIK). Also the screen capture is not 
necessary for now.

A good start would be to launch Firefox inside wayland headless session 
and I can work from this point further to investigate what's needed. If 
the plugin provides such functionality that will be fine for now.

Thanks,
ma.

[1] 
https://firefox-source-docs.mozilla.org/testing/marionette/marionette/index.html



More information about the wayland-devel mailing list