| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Id89ec40a3f484808385401829a09a43781a1bed7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
| |
Change-Id: I4b460bd1e5ac8541dcbf9afb2782187218d257e1
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
|
|
| |
Also removes overlapping old tests and adds a (currently failing) test for
QTBUG-72828.
Task-number: QTBUG-72828
Change-Id: Id93d5872ed1c4f181935c1e493e9d8d0ae9cfaf3
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a number of issues with the current client testing:
- Adding new compositor functionality is cumbersome (need to add compositor
send method, command, implementation, not to mention creating new wrapper
objects.
- Customizing available globals and their versions is not possible and would be
hard to implement. I.e. how to test that functionality works with old and new
versions of an interface? Handle globals being destroyed. We did this with
wl_output, but it was painfully cumbersome.
- Hard to verify that the compositor state is clean between tests. It is
currently done in some tests, but requires boiler plate code which needs to
be added and maintained for each test.
- In general lots of boiler-plate for new tests. (We have to have separate
tests as long as Qt has global/static state. I.e. if one shell extension has
been initialized, we can't deinitialize and initialize another one, so tests
have to be separate.)
- Dispatching server events tied to the client event loop sometimes makes it
hard to write tests without deadlocks.
- Abstraction, encapsulation and automatic behavior that can't be disabled
makes it hard to test low-level functionality like surface exposure.
So, in an attempt to mitigate these issues, I wrote a new testing framework.
- Compositor dispatch is running continuously in it's own thread, access to
compositor state is guarded by a mutex on the compositor, locking this will
make dispatching stop, so the test can safely access internals. Although a
bit cumbersome at first this makes it much easier to directly use server
protocol commands from the test itself, i.e. no need to create commands for
every single thing we want to test.
- The CoreCompositor::exec template method can accept a lambda that will be run
with dispatching stopped. It can also return a value, conveniently letting us
safely extract or modify compositor state from tests.
- This framework also takes full advantage of the qtwaylandscanner, using
wrapper classes for everything, reducing boiler plate considerably.
- The compositor parts are designed to do as little as possible automatically,
but still provide easy ways to enable common functionality, like releasing
buffers automatically, configuring shell surfaces etc.
- Compositor globals are pluggable, use add<GlobalClass>() and
remove<GlobalClass>() to add new global interfaces. I.e. easy to create a
compositor with or without data_device_manager for instance.
- DefaultCompositor provides a sensible default set of functionality and
convenience methods for most test-cases. Custom ones can still be made by
inheriting from CoreCompositor directly instead or by removing or adding
globals to DefaultCompositor.
- Globals have an isClean() method. Implement it to verify that the client
didn't leave any objects lying around from the previous test.
CoreCompositor::isClean calls isClean on the globals so a single call is all
that's needed.
In short, we've traded mock compositor encapsulation and thread safety
guarantees for less boiler-plate, easier and more convenient access to
internals.
Anything accessing compositor state should go into a exec() call, or through
the wrapper macros QCOMPOSITOR_VERIFY and QCOMPOSITOR_COMPARE (or the TRY
versions). I've also tried to make the compositor print warnings if compositor
state is accessed in an unsafe way.
The mock compositor is currently built once per test due to CI limitations
(same thing as with the old tests).
Change-Id: Ia3feb80ce175d3814292b7f4768a0cc719f8b0e8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QPA plugin] Added support for fullscreen-shell unstable v1.
The fullscreen_shell_unstable_v1 interface displays a single surface
per output and it is used for nested compositors, where each output
is rendered in a surface that is then displayed by the main
compositor.
For example weston could be the main compositor and a QML compositor
could be launched as a client using this shell integration to
display it inside weston.
Change-Id: I037679a283ff03cb4bdf4b3fed59945090ec9250
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
| |
Tests ivi surface creation and configuration.
Task-number: QTBUG-66512
Change-Id: Idff60eb99eb34b7fce1c935bd036ef18a8f97d7c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
|
| |
A failed wl_display_connect should make the platform plugin fail gracefully.
Add a test for it to make sure.
Change-Id: I87a3d9ee151fcdb1bc6ad9ffba44ad5014ede005
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
|
|
| |
Apart for some new mocking code for xdg shell v6, this is mostly a refactor of
the existing test, to reuse the existing mocking code between the different
shell integrations.
Change-Id: I68f93ab12ac47e51a50fd69647286cab46a3c595
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
| |
The client and server parts are separate modules, so they need separate
top-level directories under tests/auto. This also makes it easier to add
new tests later.
Change-Id: I393341b6f4e8fc3afa480653f3482192e002e425
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
|
| |
having qtbase include it for everyone is wasteful, so do it here
explicitly.
Change-Id: I9bf39a48fe3323aaa5471a638760ac61a61de683
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
|
|
|
|
|
|
| |
Tests still fail when running like before.
Change-Id: I9c0a5e8068fa7af7abc0018e6e9c4f08aa39533b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
|
|
|
|
|
|
|
| |
still failes though
Change-Id: I7978c752b02f32a2e2c587c0ad674c51c5e0ad22
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
|
|
|
|
|
|
|
|
| |
Use our own qualified pkg-config mkspec feature rather than directly
executing the system binary
Change-Id: I4b162cd8d2d9a8bd5d0b3adb9ca935df9ff96a69
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
|
|
|
|
|
| |
Change-Id: I0628a7655a6deb061a5d0b6c6304c89d8655cf11
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
|
|
|
|
|
|
|
|
| |
This is convenient if we want to reconfigure without reconfiguring
QtBase.
Change-Id: I719ba0d89905287a557e962ed6d804514e44b7f5
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
|
|
|
|
|
| |
Change-Id: I4db26cbee88f329a926914ff878e6efa9b0c8395
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
|
|
Similar to the compositor auto-test, except this time we mock the
compositor, and test the client code, by forcing the wayland plugin to
be used.
Change-Id: I363019ff7e136db6822993f1881fec48a02a7db4
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
|