- Notifications
You must be signed in to change notification settings - Fork14
Wayland Conformance Test Suite
License
GPL-2.0, GPL-3.0 licenses found
Licenses found
canonical/wlcs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
wlcs
aspires to be a protocol-conformance-verifying test suite usable byWayland compositor implementors.
It is growing out of porting the existing Weston test suite to be runinMir's test suite,but it is designed to be usable by any compositor.
There have been a number of previous attempts at a Wayland compositor testsuite - theWayland Functional Integration Test Suite,and theWeston test suiteare a couple of examples.
What setswlcs
apart from the graveyard of existing test suites is itsintegration method.
Previous test suites have used a Wayland protocol extensionto interrogate the compositor state. This obviously requires that compositorsimplement that protocol, means that tests only have access to informationprovided by that protocol, and the IPC means that there isn't a canonicalhappens-before ordering available.
Instead,wlcs
relies on compositors providing an integration module,providingwlcs
with API hooks to start a compositor, connect a client,move a window, and so on. This makes both writing and debugging tests easier -the tests are (generally) in the same address space as the compositor, so thereis a consistent global clock available, it's easier to poke around incompositor internals, and standard debugging tools can follow control flow fromthe test client to the compositor and back again.
In order forwlcs
to test your compositor you need to provide anintegration module. This needs to implement the interfaces found ininclude/wlcs
. If your integration module isawesome_compositor_wlcs_integration.so
, then runningwlcsawesome_compositor_wlcs_integration.so
will load and run all the tests.
wlcs
requires a small number of hooks into your compositor to drive thetests - it needs to know how to start and stop the mainloop, to get an fd toconnect a client to, and so on.
To access these hooks,wlcs
looks for a symbolwlcs_server_integration
of typestruct WlcsServerIntegration const
(defined ininclude/wlcs/display_server.h
) in your integration module.
About
Wayland Conformance Test Suite