Robert Mader
db2cf4b874
tests/wayland: Bump wl_compositor version for test clients
...
Version 2 is required for buffer transform, however directly going
for the highest currently supported version doesn't break any
tests and makes more features available.
Also fix indentation below while on it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1055 >
2022-06-03 09:03:10 +00:00
Jonas Ådahl
57d3b5225e
tests: Add basic X11 WM test
...
This launches Xvfb, using xvfb-run, and inside tests the following:
1. Launching 'mutter --x11' works
2. Launching a couple of X11 clients works (doesn't crash or result in
warnings)
3. Launching 'mutter --x11 --replace' works
4. Terminating works
It does this using a simple shell script.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2434 >
2022-06-02 17:19:42 +00:00
Jonas Ådahl
c9960850c8
tests/kms/render: Add direct scanout test case
...
This adds a minimalistic fullscreen direct scanout test case, that runs
on vkms. It doesn't use EGL, and it uses uninitialized memory, thus it
lacks any kind of implicit synchronization, but it does test that the
scanout selection paths are working.
What is tested is:
* DMA buffer allocated using gbm on top of VKMS
* Buffer passes a mode setting TEST_ONLY check
* Paint is omitted
* Correct buffer active in KMS after presentation
What isn't yet tested:
* Implicit synchronization related behavior
* Presented pixel content
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2417 >
2022-06-02 08:59:13 +00:00
Jonas Ådahl
5be555c59d
tests/kms/render: Disconnect signal in end of test case
...
Otherwise it'll get invoked in later test cases.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2417 >
2022-06-02 08:59:13 +00:00
Jonas Ådahl
f76258b840
tests/kms/render: Get backend from context
...
Avoids a couple of singleton accesses.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2417 >
2022-06-02 08:59:13 +00:00
Jonas Ådahl
a8c2df6fb5
tests/test-driver: Add way to send generic properties to client
...
This will make it rather convenient to send arbitrary strings, e.g. file
paths, to the client test case.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2417 >
2022-06-02 08:59:13 +00:00
Georges Basile Stavracas Neto
0b47554f74
tests/interactive: Port to cogl_texture_2d_new_from_data
...
Same old story.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:28:16 -03:00
Georges Basile Stavracas Neto
8f6469f6cb
tests/interactive: Replace cogl_texture_new_from_file
...
The interactive tests are the last users use this deprecated API, so
port them to the appropriate alternatives - either CoglTexture2D or
CoglTexture2DSliced.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Georges Basile Stavracas Neto
ca0e467a3b
tests/interactive: Drop test-cogl-image-convert
...
This test exercises a form of image conversion that isn't exposed in
the new CoglTexture2D APIs, which is about to be removed. Drop this
test.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Georges Basile Stavracas Neto
da8353dbcd
tests/interactive: Replace most CoglHandles by CoglTextures
...
There are 2 remaining CoglHandles, but they're for shaders, which
actually return CoglHandle as part of the API signature.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Georges Basile Stavracas Neto
9f3191fe9c
tests/interactive: Drop empty test_coglbox_finalize
...
All of them were devoid of code.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Georges Basile Stavracas Neto
dbae8d7aa7
tests/interactive: Make TestCoglbox final
...
This cleans up a lot of boilerplate code.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Georges Basile Stavracas Neto
83e0553534
tests/interactive: Cleanup tabs
...
I also sneaked in some code style fixes on the lines that were
touched. Judge me freely, it's all for the greater good.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Jonas Ådahl
e939d5b89a
tests: Check that X11 selections handle Xwayland disappearing
...
It works by using an X11 client to set the clipboard content, using a
mimetype that on purpose is not handled by the clipboard manager. The
test then makes sure we don't crash when trying to transfer data from
the old X11 selection source.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364 >
2022-05-31 12:00:55 +00:00
Jonas Ådahl
7e8bddccb5
tests/async-waiter: Keep track of X11 display it was created with
...
The Xwayland server can go away at any time; when this happen we might
have a test client running, and for it to tear down more nicely, make
sure to avoid trying to clean up X11 resources on the old X11 display.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364 >
2022-05-31 12:00:55 +00:00
Jonas Ådahl
c575696acc
tests/test-client: Add clipboard-set command
...
To be used for clipboard testing.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364 >
2022-05-31 12:00:54 +00:00
Jonas Ådahl
f64259ceae
tests/wayland: Draw surface with shared helper
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
9b97c9b4d4
tests/wayland/xdg-toplevel-bounds: Port to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
2c2aa7acc3
tests/wayland/xdg-activation: Port to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
a7161e1132
tests/wayland/subsurface-reparenting: Port to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
e32b9956fe
tests/wayland/subsurface-remap-toplevel: Port to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
1562bcc6fd
tests/wayland/subsurface-parent-unmapped: Port to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
08acf51423
tests/wayland-display: Emit sync event signal from test driver
...
This is for hooking up sync events from the compositor side test case.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
d5367f7332
tests/wayland: Make display helper a GObject
...
This is in preparation for adding signals.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
b0528dcd53
tests/wayland: Port xdg-shell action tests to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
d58bd948a8
tests/wayland/subsurfaces: Use helper to manage display
...
Adds a _free() function since the display is reopened multiple times and
cleaned up in between.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
a936219983
tests/xdg-apply-limits: Move out generic display management
...
This is meant to be used by other test clients, in order to reduce the
amount of code duplication that currently exists in the test cases.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Dor Askayo
40edfbcbeb
tests/screen-cast: Avoid undefined behavior with GSource
...
Follow the existing convention in Mutter and avoid downcasting
custom GSource structs.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2406 >
2022-05-11 15:01:31 +00:00
Jonas Ådahl
70ab4b6519
build: Make each executable/library have their own log domain
...
This helps reading log output during, as it's otherwise often unclear
whether a log entry came from a test client or mutter itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2391 >
2022-04-29 18:58:38 +00:00
Bartłomiej Piotrowski
7a7fb863a2
tests/virtme-run: Expose two CPUs
...
We're multi threaded, so make things more like reality by exposing more
CPUs using the '-smp 2' qemu option.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152 >
2022-03-28 16:17:21 +00:00
Bartłomiej Piotrowski
7435bfd0e5
tests/virtme-run: Disable pdcm
...
There are issues when running a nested KVM with Fedora 35 when pdcm is
enabled. Work around this for now by disabling it.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2022075
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152 >
2022-03-28 16:17:21 +00:00
Bartłomiej Piotrowski
4ce233b89e
tests/virtme-run: Create fake stdin
...
When running in CI, the stdin may be /dev/null, which causes issues
for qemu. Avoid this issue by creating our own fake stdin.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152 >
2022-03-28 16:17:21 +00:00
Jonas Ådahl
31bc1c80ab
tests/kvm: Forward the test environment variables to the VM
...
This will help with finding the right libdefault.so and correctly setup
the GLib test framework.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152 >
2022-03-28 16:17:21 +00:00
Jonas Ådahl
189068d465
tests/build: Set up test environment using a dict()
...
This will allow us to reuse the keys and values more easily, as later
commits will rely on being able to iterate over the keys and values to
construct explict env strings for passing into special test cases.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152 >
2022-03-28 16:17:21 +00:00
Jonas Ådahl
1914f533b8
tests/screen-cast: Add input injection tests to screen cast client
...
This tests that cursor metadata are handled properly, and that the
display server handles input events correctly, including ones that are
sent too early.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2270 >
2022-03-04 18:13:45 +00:00
Jonas Ådahl
d649445bb7
tests/screen-cast: Also make it a remote desktop session
...
This will allow emitting input events / remote control too.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2270 >
2022-03-04 18:13:45 +00:00
Jonas Ådahl
88cfd31f18
tests/screen-cast: Test virtual stream resizing
...
This test resizes the stream by updating the PipeWire stream properties.
This triggers a format negotiation, that results in the buffers being
reallocated with the new size. The test makes sure we eventually
receive this new size.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2270 >
2022-03-04 18:13:45 +00:00
Jonas Ådahl
c49037469a
tests/screen-cast-client: Set an explicit size
...
Don't set a range, take control of the size. This is fine, since we're
only recording virtual monitors, which get their size from the PipeWire
negotiation.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2270 >
2022-03-04 18:13:45 +00:00
Jonas Ådahl
fadffe3fad
wayland/xdg-shell: Add toplevel bounds support
...
This implements the new 'bounds' event that is part of the xdg_toplevel
interface in the xdg-shell protocol. It aims to let clients create
"good" default window sizes that depends on e.g. the resolution of the
monitor the window will be mapped on, whether there are panels taking up
space, and things like that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2167 >
2022-03-04 14:48:25 +00:00
Jonas Ådahl
28a5946a28
tests/wayland-unit-tests: Remove unnecessary message check
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2167 >
2022-03-04 14:48:25 +00:00
Jonas Ådahl
cb424b68e6
tests/wayland-unit-tests: Make some function names less generic
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2167 >
2022-03-04 14:48:25 +00:00
Carlos Garnacho
e736b04deb
clutter: Remove "source" event union fields
...
These are no longer used, drop the last places that modify those
in event structs and remove them.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2311 >
2022-03-04 10:58:28 +00:00
Carlos Garnacho
5dd818cf1a
tests: Move away from clutter_event_get_source()
...
The target actor as seen by the stage is equivalent, so use that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2311 >
2022-03-04 10:58:28 +00:00
Jonas Ådahl
5588f2a21c
tests: Decrease boiler plate needed for adding more tests
...
Structure tests in a list of dictionaries, instead of requiring each
test to have its own executable(...) and test(...) statement. The
intention of this is to make it easier to add more test cases.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
afca974405
tests: Move monitor test utils into libmutter-test.so
...
It already was built into it without any symbols exported, but also
duplicated in test cases that used it. Make it so that the built in
functions are exported, with prefixes, and make all tests use the
exported functions. While at it, make things go via MetaContext or
MetaBackend depending on how early in initialization things are run.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
3fc0d8b81d
tests/build: Remove duplicated meta-gpu-test.c file inclusion
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
15b8f89c02
tests: Move ref test framework to libmutter-test.so
...
Will make it available to most tests without having to explicitly
include.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
bd18af1a0d
tests/build: Sort sources list
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
195766cb69
tests: Add helper for creating virtual test monitors
...
This uses virtual monitors in the headless backend, in contrast to the
ones used by the monitor configuration tests which use the nseted
backend.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
b7f23c1baf
tests/utils: Add helper to find a window given a title
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00